Modify menu.lst...


Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Modify menu.lst...

  1. #1
    Join Date
    Feb 2009
    Posts
    42

    Modify menu.lst...

    I had XP and Ubuntu 2xboot, each its own HD, on IDE secondary channel. Ubuntu master, XP slave, 2 ODD's on IDE primary.

    I added a PCI IDE controller with another HD, and PCLOS already on it. Then I imported the whole GRUB menu from Ubuntu into PCLOS grub menu.

    BUT, I think disk enumeration changed...

    I click on this menu entry in PCLOS GRUB:
    Code:
    title Ubuntu in (hd1,0)
    root (hd1,0)
    configfile /boot/grub/menu.lst
    ...it brings up the [old] Ubuntu grub. From there, neither Ubuntu or XP will boot.

    So if while I have that menu up, I can text edit Ubuntu from (hd0,0) to (hd1,0), and it boots fine. Now I need to make that permanent.

    BUT, if I choose XP from the Ubuntu grub menu, no boot.

    The [old/Ubuntu Grub] XP menu entry WAS
    Code:
    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/hdb1
    title		Microsoft Windows XP Professional
    map             (hd0) (hd1)
    map             (hd1) (hd0)
    rootnoverify    (hd1,0)
    chainloader	+1
    I tried to edit THAT one the same way as I did for Ubuntu, to account for enumeration change, like so:
    map.................... (hd0) (hd2)
    map ...................(hd2) (hd0)
    rootnoverify...... (hd2,0)
    press 'b' to boot; no luck.

    Then I tried editing :
    map ...................(hd0) (hd1)
    map ................... (hd1) (hd0)
    rootnoverify ...... (hd2,0)
    press 'b' to boot; no luck.

    I need to boot Ubuntu, and edit ITS' GRUB???

  2. #2
    Join Date
    Feb 2009
    Posts
    42
    I got Ubuntu (secondary master) into PCLOS grub menu using UUID string.

    I have the UUID string for Windows disk (secondary slave), but what is the correct menu.lst entry string?

    Thanks...

  3. #3
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    Your original bootable XP instructions suggest your Ubuntu disk was recognised as (hd0), XP detected as the 2nd disk or (hd1) to Grub.

    When you add the 3rd disk with PCLos it was given priority in the detection sequence and become (hd0). Therefore both Ubuntu and Xp failed to boot. They appear to be (hd1) and (hd2) now.

    I believe these commands would work for your Xp in menu.lst
    Code:
    title		Microsoft Windows XP Professional
    map             (hd0) (hd2)
    map             (hd2) (hd0)
    chainloader	+1
    boot
    If you still have a problem post the output of the following Grub commands (in terminal after issuing "grub" to trigger as Grub shell) here
    Code:
    geometry (hd0)
    geometry (hd1)
    geometry (hd2)
    and tell us the size and partitions of your disks
    Last edited by saikee; 02-15-2009 at 09:33 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  4. #4
    Join Date
    Feb 2009
    Posts
    42
    Quote Originally Posted by saikee View Post
    Your original bootable XP instructions suggest your Ubuntu disk was recognised as (hd0), XP detected as the 2nd disk or (hd1) to Grub.

    When you add the 3rd disk with PCLos it was given priority in the detection sequence and become (hd0). Therefore both Ubuntu and Xp failed to boot. They appear to be (hd1) and (hd2) now.
    That is what I was believing.

    BUT, NOT by default; rather because I changed boot device sequence FROM 1st=CD, 2nd=HD0, ..., TO 1st=CD, 2nd=SCSI (PCI IDE card), 3rd-HD0. AND JUST AS I TYPE THIS, I AM WONDERING... WHAT IS HD0, WHEN SCSI DISK IS FIRST HD (HDO) ???


    Perhaps enumeration does NOT change - since the 3rd disk was added on by the PCI/IDE controller card???

    Quote Originally Posted by saikee View Post
    I believe these commands would work for your Xp in menu.lst
    Code:
    title		Microsoft Windows XP Professional
    map             (hd0) (hd2)
    map             (hd2) (hd0)
    chainloader	+1
    boot
    I booted PCLOS, changed menu item to above, rebooted, and no boot.


    Quote Originally Posted by saikee View Post
    If you still have a problem post the output of the following Grub commands (in terminal after issuing "grub" to trigger as Grub shell) here
    Code:
    geometry (hd0)
    geometry (hd1)
    geometry (hd2)
    and tell us the size and partitions of your disks
    So I brought up 1st GRUB, 'esc' for text mode interface, 'c' for command-line, @GRUB:
    Attached Images Attached Images

  5. #5
    Join Date
    Feb 2009
    Posts
    42
    If I pull the PCI/IDE card and the attached disk, I can boot to Ubuntu's GRUB loader.

    Then from the Ubuntu GRUB menu, I can boot Ubuntu, OR XP without a problem.

    If I re-install the PCI/IDE card with PCLOS, neither will boot.

  6. #6
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    sorry

    I missed one line in my suggested commands by coping your text which missed that line. Try this
    Code:
    title		Microsoft Windows XP Professional
    root (hd2,0)
    map             (hd0) (hd2)
    map             (hd2) (hd0)
    chainloader	+1
    boot
    My prediction of the Xp relagating to (hd2) was proved correct by your screen image.

    If Xp fails to boot up again do "esc" and "c" to get Grub text mode and type in the about lines (without the "title" statement) manually and tell us what problem Grub is complaining.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  7. #7
    Join Date
    Feb 2009
    Posts
    42
    Code:
    title		Microsoft Windows XP Professional
    root (hd2,0)
    map             (hd0) (hd2)
    map             (hd2) (hd0)
    chainloader	+1
    boot
    That returned error 27, unrecognized command.

    So I deleted the first line and 'b' boot.

    It flashed the lines, then went to blank screen. Had to power cycle with power button to reset.

    ---------------------

    This is another entry which does not work; from whence it came, I know not:
    Code:
    root (hd2,0)
    map (0x81) (0x80)
    map (0x80 (0x81)
    makeactive
    chainloader +1
    What does this mean:
    Code:
       [7C40] -> 80 ("Boot Drive") NOTE: For those of you with multi-OS
                 booting systems, if your Linux installation with GRUB's
                 remaining software (stage2, menu file, etc.) is located
                 somewhere other than on the Primary Master drive, this
                 value will be 81, 82, etc. depending upon which drive
                 that Linux OS's /boot/grub directory is located.
    Does it mean that my strange map location entry, INSTEAD OF (0x80) should be (0x8<?>) (my XP is IDE secondary slave)

    ???

  8. #8
    Join Date
    Feb 2009
    Posts
    42
    And in what [BIOS] access mode should each of my 3 drives be set? Auto, LBA,?

  9. #9
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    The "root (hd2,0) instructs Grub that the root partition of your Xp is in the 1st partition of the 3rd disk as Grub counts from zero.

    The two map statements tell Grub to swap the (hd0) and (hd2) disk order on-the-fly so that Xp could be booted up as the first hard disk as the way it was originally installed.

    The "chainloader +1" tells Grub to surrender its control to Xp's boot loader by paste it at the +1 position or the 2nd sector of Xp's partition.

    The "boot" statement is the green light to tell Grub to go ahead.

    If you have an error telling you Grub cannot recognise your command then it will be a syntax error from typing. Check your lines again and locate exactly which line upsets Grub. You cannot omit a command here because each has its own purpose.

    A hard disk is also recognised by the hex number so (0x80), which is a Linux convention, is the equivalent to (hd0) which is Grub's notation. Lilo also use the (0x80), (0x81) and (0x82) as 1st 2nd and 3rd hard disks. Grub uses the commands according to its own convention.

    Always use LBA for modern hard disks.

    Try the manual booting entering the instruction line by line as I suggested. This way Grub stops at the exact one it cannot recognise.

    In the three hard disks you have there is only one ntfs partition used by Xp. This is the 1st partition of your (hd2) so the root can only be (hd2,0).

    The rootnoverify is to tell Grub no need to verify if it can be read. Grub actually can't read a NTFS partition! That is why it reports "Filesystem type unknown". I never use "rootnoverify" as the nano seconds I waste by command "root" matter nothing to me.

    If you are still stuck, boot up a Linux and show us the output of the command
    Code:
    fdisk -l
    Last edited by saikee; 02-16-2009 at 12:50 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  10. #10
    Join Date
    Feb 2009
    Posts
    42
    Quote Originally Posted by saikee View Post

    If you have an error telling you Grub cannot recognise your command then it will be a syntax error from typing.
    Not in THIS case... I entered just as pic 1, and the result as pic 2...

    Is this telling me that the title line is incorrect?

    Omitting the title made it lock up - as mentioned in post#7. Should it be changed?
    Attached Images Attached Images

  11. #11
    Join Date
    Feb 2009
    Posts
    42
    Code:
    Password:
    [root@localhost ~]# fdisk -l
    
    Disk /dev/hdc: 80.0 GB, 80026361856 bytes   <---Ubuntu/secondary IDE/master
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hdc1   *           1        9447    75882996   83  Linux
    /dev/hdc2            9448        9729     2265165    5  Extended
    /dev/hdc5            9448        9729     2265133+  82  Linux swap / Solaris
    
    Disk /dev/hdd: 30.7 GB, 30735581184 bytes   <---XP/secondary IDE/slave
    255 heads, 63 sectors/track, 3736 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hdd1   *           1        3736    30009388+   7  HPFS/NTFS
    
    Disk /dev/hdf: 80.0 GB, 80026361856 bytes   <---PCLOS/PCI-IDEcard
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hdf1   *           1        1019     8185086   83  Linux
    /dev/hdf2            1020        9729    69963075    5  Extended
    /dev/hdf5            1020        1528     4088511   82  Linux swap / Solaris
    /dev/hdf6            1529        9729    65874501   83  Linux
    [root@localhost ~]#

  12. #12
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    Don't think you got my message.

    When you see the Grub screen please "c" to drop in to a Grub prompt.

    Then type each line, except omitting the title statement, one at a time.

    When Grub accept the command it may or may not issue a response but if it does not like the command it will shout and stop.

    Your problem may be just a bad copy of Grub but let's try out the manual booting as suggested above.

    Typing "b" to activate a set of command is not 100&#37; manual booting which is cold and extremely enjoyable because you talk to Grub directly!
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  13. #13
    Join Date
    Feb 2009
    Posts
    42
    Quote Originally Posted by saikee View Post
    Don't think you got my message.

    When you see the Grub screen please "c" to drop in to a Grub prompt.

    Then type each line, except omitting the title statement, one at a time.

    When Grub accept the command it may or may not issue a response but if it does not like the command it will shout and stop.

    Your problem may be just a bad copy of Grub but let's try out the manual booting as suggested above.

    Typing "b" to activate a set of command is not 100&#37; manual booting which is cold and extremely enjoyable because you talk to Grub directly!
    Copy on line-by-line entry...

    First line came back void...
    root (hd2,0)
    "Filesystem type unknown, partition type 0x7

    GRUB prompt returns.



    Edit:
    I did a FIXMBR execution to the Windows disk the other day. Could this matter? (Again, it DOESN'T matter if I pull the PCI/IDE card with the 3rd disk, because Ubuntu and XPthen will boot OK)...


    2xEDIT:
    I restarted the line-by-line, starting with:
    rootnoverify (hd2,0) accepted
    map (hd0) (hd2) accepted
    map (hd2) (hd0) accepted
    chainloader +1 accepted
    boot return:blank screen.
    Last edited by buccaneere; 02-16-2009 at 06:43 PM.

  14. #14
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    There has been confusions on the exact error of booting Xp when there are 3 hard disks.

    As far I am aware the Grub commands are correct and have been all executed. Xp simply failed in the boot up operation.

    I have not used a SCSI disk for years. Your information suggest the last disk, one which has PCLinuxOS, is recognised as a SCSI device but you keep telling us it is hooked up to a PCI-IDE controller.

    It is possible that the new 3rd disks isn't recognised by Xp or the disk needs a driver before it can be detected by Xp. Thus to Grub there are 3 disks while Xp can only see 2. This may just be possible stop Xp from booting up normally.

    I don't have a cure for this but the obvious thing to do is to tell the Bios not to change the disk order for the first 2 disks and so the 3rd disk, controlled by PCI-IDE, is in the 3rd position of the booting order if it is added. This way you have the two original systems booting normally and only need to add PCLos to the menu.lst of Ubunu.

    Normal mobo have only 2 IDE channels permitting 4 devices of hda, hdb, hdc and hdd. I have not come across more than 2 IDE channels. It would make sense to me that the PCI-IDE controller may be treated as a SCSI type because the 4 IDE devices have been assigned. Linux has no such problem of switching but I don't have experience on how a MS system react to such arrangement. Sata is treated as a SCSI type disk and early Xp, without the services packs, needs a driver just to recognise one. So Xp may have an issue with your 3rd disk if you try to use it.

    Let us know if the above arrangement works for you.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  15. #15
    Join Date
    Feb 2009
    Posts
    42
    About a month ago, I was doing the same thing, and someone pointed me to an old TSG post of yours. It worked, before I botched something up trying to add FC8 last week, and had to start over again.

    Only thing different then was XP then was secondary IDE MASTER, and Ubuntu was secondary IDE SLAVE.

    This is the thread:
    http://www.linuxforums.org/forum/ubu...pt-ubuntu.html

    (I'm TRS-80 vet in TSG) In the TSG thread, your FIRST code entry was what worked.

    Your code imported the entire functioning GRUB, and everything worked - again, with XP master, and Ubuntu slave.

    Does this shed any light onto the situation???

    Otherwise, I can try update GRUB, or re-install PCLOS and see if it maps the root differently somehow, or switch back XP/Ubuntu, master/slave and re-configure GRUB (ugh)...

    UNLESS, I have a disk jumper connector wrong...
    Last edited by buccaneere; 02-16-2009 at 11:26 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •