LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 05-17-2007, 02:53 AM   #1
r00ster
Member
 
Registered: May 2007
Location: boundary beach, bc
Distribution: Debian 3.2.46-1+deb7u1
Posts: 199

Rep: Reputation: 15
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
 
Old 05-17-2007, 05:28 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
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
 
Old 05-20-2007, 06:06 AM   #3
r00ster
Member
 
Registered: May 2007
Location: boundary beach, bc
Distribution: Debian 3.2.46-1+deb7u1
Posts: 199

Original Poster
Rep: Reputation: 15
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.
 
Old 05-20-2007, 05:07 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
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?
 
Old 05-21-2007, 02:39 AM   #5
r00ster
Member
 
Registered: May 2007
Location: boundary beach, bc
Distribution: Debian 3.2.46-1+deb7u1
Posts: 199

Original Poster
Rep: Reputation: 15
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
 
Old 05-22-2007, 11:45 AM   #6
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
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.
 
Old 05-23-2007, 01:13 AM   #7
lein
Member
 
Registered: Jul 2006
Location: Australia
Distribution: Mint 14/16 & Raspbian
Posts: 73

Rep: Reputation: 23
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.
 
Old 05-23-2007, 10:37 AM   #8
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 30
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.
 
Old 05-23-2007, 10:40 AM   #9
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 30
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.
 
Old 05-23-2007, 02:37 PM   #10
lein
Member
 
Registered: Jul 2006
Location: Australia
Distribution: Mint 14/16 & Raspbian
Posts: 73

Rep: Reputation: 23
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 ***

Last edited by lein; 05-23-2007 at 02:39 PM.
 
  


Reply

Tags
grub, chainload


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade to DD and it changed passwd. ty13 Ubuntu 2 08-20-2006 06:49 PM
Using Enlightenment, changed theme cannot access menu chrisford553 Linux - General 1 10-01-2004 09:47 PM
Menu-transparency changed with KDE 3.2.3 TLV Debian 2 08-05-2004 06:37 AM
start menu has suddenly changed pomelo Mandriva 3 11-21-2003 03:24 PM
ownership of files changed after upgrade Tinkster Slackware 1 12-20-2002 07:34 PM


All times are GMT -5. The time now is 04:38 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration