LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Upgrade changed boot menu (http://www.linuxquestions.org/questions/linux-desktop-74/upgrade-changed-boot-menu-554553/)

r00ster 05-17-2007 02:53 AM

Upgrade changed boot menu
 
I recently migrated from XP-Home to Etch 4.0/KDE 3.5 on my home desktop PC. So I'm a GNUbie. I have Etch installed on a master HD and XP chainloaded on the slave.

Once 4.0 became stable, I did an upgrade from kernel 2.6.18-3-686 to 2.6.18-4-686 but my Grub Boot menu got messed up in the process.

Being green at using the konsole (by which I mean I haven't a clue what I'm doing) I don't want to
mess up my boot/grub so's I can't boot up at all. I would appreciate confimation that I'm going about my attempt to fix the problem correctly.

Right now “pager /boot/grub/menu.lst” looks like the following... with my proposed ammendment in red. I'm assuming I can make the alt-edit using nano.

Happy trails,

r00ster

Quote:

title Debian GNU/Linux, kernel 2.6.18-4-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-4-686 root=/dev/hda1 ro installgui install
standard"
initrd /boot/initrd.img-2.6.18-4-686
savedefault

title Debian GNU/Linux, kernel 2.6.18-4-686 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-4-686 root=/dev/hda1 ro installgui install
standard" single
initrd /boot/initrd.img-2.6.18-4-686
savedefault

title Debian GNU/Linux, kernel 2.6.18-3-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-3-686 root=/dev/hda1 ro installgui install
standard"
initrd /boot/initrd.img-2.6.18-3-686
savedefault

title Debian GNU/Linux, kernel 2.6.18-3-686 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-3-686 root=/dev/hda1 ro installgui install
standard" single
initrd /boot/initrd.img-2.6.18-3-686
savedefault

title windows xp
map (hd0)(hd1)
map (hd1)(hd0)
chainloader +1
make active
boot


### END DEBIAN AUTOMAGIC KERNELS LIST

raskin 05-17-2007 05:28 PM

First, nano is viable editor. Surely safer for learning user than Vim I like or Emacs I avoid.

I am not sure that your code will select NTLDR partition correctly for GRUB to know what to chainload.

So:
1) Print your menu.lst . Now if anything ever goes wrong with it (only with it) you should be able to press 'c' and manually enter your 4 lines to boot linux followed by 'boot' command.

2) I guess 'map's are redundant. Try without them - you risk only not booting Windows (at first attempt) anyway.

3) add rootnoverify line. It will show GRUB which partition holds NTLDR and will tell it not to assume any sane *nix-like bootloader.

4) last boot line is redundant. I am not sure what effect it will give, maybe no effect at all, but remove it.

Personally I use the following (I have already substituted first primary partition on the only hard disk besides primary master in rootnoverify). It works for me.

Code:

title Windows XP
rootnoverify (hd1,0)
chainloader +1


r00ster 05-20-2007 06:06 AM

Quote:

Originally Posted by raskin
First, nano is viable editor. Surely safer for learning user than Vim I like or Emacs I avoid.

I am not sure that your code will select NTLDR partition correctly for GRUB to know what to chainload.

So:
1) Print your menu.lst . Now if anything ever goes wrong with it (only with it) you should be able to press 'c' and manually enter your 4 lines to boot linux followed by 'boot' command.

2) I guess 'map's are redundant. Try without them - you risk only not booting Windows (at first attempt) anyway.

3) add rootnoverify line. It will show GRUB which partition holds NTLDR and will tell it not to assume any sane *nix-like bootloader.

4) last boot line is redundant. I am not sure what effect it will give, maybe no effect at all, but remove it.

Personally I use the following (I have already substituted first primary partition on the only hard disk besides primary master in rootnoverify). It works for me.

Code:

title Windows XP
rootnoverify (hd1,0)
chainloader +1


Thanks Raskin;

It took a little more tweaking, but I finally got joy.
The code I needed to add was:
Quote:

title Windows XP
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
I copied my revised "/boot/grub/menu.lst" to a document in my home folder. I want to be sure I don't lose it again. Can I use nano to revise my "/boot/grub/menu.backup_lst" so it looks the same as my 'new' "/menu.lst"?

r.

raskin 05-20-2007 05:07 PM

I am glad you have succeeded. Thanks for telling that XP still needs map, maybe it'll be interesting to me some day. I do not understand why do you want to use editor to manually revise a text file to be identical to another; I guess 'cp' does the same work better. Or do I miss something in your intent?

r00ster 05-21-2007 02:39 AM

Quote:

Originally Posted by raskin
I am glad you have succeeded. Thanks for telling that XP still needs map, maybe it'll be interesting to me some day. I do not understand why do you want to use editor to manually revise a text file to be identical to another; I guess 'cp' does the same work better. Or do I miss something in your intent?

Raskin;

No, you haven't missed anything. Etch is my first crack at linux, and I have only been using it for a few weeks. I have a lot to learn. I'm still fumbling through the GUI (KDE) side of things and still very timid about using the konsole for fear of scrambling something important.

Thanks to your cue, I can see that "cp" does indeed fit the bill much better.

Dasvidaniya,

rod

raskin 05-22-2007 11:45 AM

Well, 'info coreutils' and 'man bash' are the places where you can see the list of basic shell commands that are available at most GNU/Linux installations. Not that you will need all of them immediately, but remember to check these lists next time when you think 'it must be done easier'. Some advanced places in these manual require some experience to understand, so do not hesitate to ask when you will suspect you need them also.

EDIT: these two lists are complementary, not duplicate.

lein 05-23-2007 01:13 AM

Quote:

Originally Posted by r00ster
...still very timid about using the konsole for fear of scrambling something important.

Just don't run as root, backup your important data and you should be safe from making mistakes that are too dire. Also I know this might not enstil confidence but everything I have learnt about computers both *nix & MS based that is worth knowing has been from making 'mistakes' and correcting them myself. Obviously with such a knowledgeable lot as there is here at LQ if you do have any trouble you will receive some great advice.

Daws 05-23-2007 10:37 AM

Quote:

title Debian GNU/Linux, kernel 2.6.18-3-686 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-3-686 root=/dev/hda1 ro installgui install
standard" single
initrd /boot/initrd.img-2.6.18-3-686
savedefault

title windows xp
map (hd0)(hd1)
map (hd1)(hd0)
chainloader +1
make active
boot


### END DEBIAN AUTOMAGIC KERNELS LIST

Should be here
Sorry to butt in guys (gals?). You do not want to put the windows section between "### BEGIN DEBIAN AUTOMAGIC KERNELS LIST" and "### END DEBIAN AUTOMAGIC KERNELS LIST" Otherwise everytime update-grub is called (i.e. everytime you install/upgrade/remove a kernel or call it manually) the windows section will disappear and you will have to enter it again.

Daws 05-23-2007 10:40 AM

Quote:

4) last boot line is redundant. I am not sure what effect it will give, maybe no effect at all, but remove it.
If you are referring to the aforementioned lines then I would not remove it. I am not sure but I think that would cause the whole menu.lst to be rewritten, again removing the windows entry.

lein 05-23-2007 02:37 PM

Quote:

Originally Posted by Daws
If you are referring to the aforementioned lines then I would not remove it. I am not sure but I think that would cause the whole menu.lst to be rewritten, again removing the windows entry.

Nah, just the word 'boot' at the end of the Windows entry is what he is getting at. But good point about the hashed '###' debian lines, I'm not sure either but until I am told differently I like your theory. I wonder what I did to mine last time I updated GRUB?

*** wanders off to check menu.lst ***


All times are GMT -5. The time now is 01:29 PM.