sidux.com
Menu

News

Give back
Last 3 Contributions
30-11-2008 20.00
25-11-2008 100.00
25-11-2008 20.00

Donate


Sponsor
hetzner.de

Languages
Preferred language:



Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
tuxracer
Post subject: Grub questions  PostPosted: Jul 06, 2008 - 01:59 AM



Joined: Jan 16, 2008
Posts: 90

Status: Offline
I have some questions for a potential sidux install. I am a newbie and would like to prepare in case of boot problems/issues. I also am inexperienced using grub and boot loaders. I have only recently used partitioning programs (Gparted). I've read that the best way is a dedicated partition for Grub but I'm still confused on how to achieve this. I don't have a floppy drive so I'd have to pursue a different method.

If I just control the boot loader by editing grub (my /boot/grub/menu.lst?) and repairing grub via the main grub methods, I am still somewhat confused how unless I use a LiveCD that has a 'grub restore/repair' utility (e.g. Mepis LiveCD, Knoppix LiveCD – used to have one? Ubuntu's?).

I am wondering if someone can steer me to a direction that will allow me to prepare my system for a sidux install and how I prepare using grub.

I have read this so far:

http://manual.sidux.com/en/sys-admin-gr ... #dual-boot

This is what is on my machine now:
Windows XP
Mepis 7
Debian Testing – Lenny

Ultimately/Eventually, I plan to have:

Windows XP
Mepis 7
Debian Testing – Lenny
sidux
Kubuntu – Hardy Heron 8.04
Fedora 9

I am planning on my next OS being sidux.

I appreciate any instructions, advice, recommendations and any links to help me figure this out.

I have collected several links including 'the grub page.'

http://users.bigpond.net.au/hermanzone/p15.htm
 
 View user's profile Send private message  
Reply with quote Back to top
infinitycircuit
Post subject: RE: Grub questions  PostPosted: Jul 06, 2008 - 05:39 AM



Joined: Oct 28, 2007
Posts: 147
Location: California
Status: Offline
I'm not sure I really understand your question. The easiest way to manage grub is to not let new installations overwrite the MBR. You can manage all your GRUB entries on a single partition and manually edit the /boot/grub/menu.lst to fit the new installs. On debian-based systems. make sure to put manually editted entries at the bottom so they aren't changed by update-grub.

_________________
http://qa.debian.org/developer.php?logi ... 0gmail.com
 
 View user's profile Send private message AIM Address  
Reply with quote Back to top
tuxracer
Post subject:   PostPosted: Jul 06, 2008 - 11:52 AM



Joined: Jan 16, 2008
Posts: 90

Status: Offline
Okay, then my question is how to do all that?

This is a clueless newbie here especially when it comes to grub. I can get to the /boot/grub/menu.lst from an editor but that's as much as I know. I can create the partitions but then I'm not sure how to create the dedicated grub partition and then where do I install when using a distro's install CD/DVD?

I'm used to installing to the MBR.

None of my distros have 'misbehaved' so far but I'm sure one will sooner or later.

Edit: I guess I have the choice to install grub there from whichever distro CD/DVD I use? It will detect ext2 or ext3 partitions?

I need to copy stage1, stage2, menu.lst and stage1_5 files to the partition?

What do you mean by this, 'bottom' of what?:
Quote:
On debian-based systems. make sure to put manually editted entries at the bottom so they aren't changed by update-grub.

You mean when partitioning and the install sequence or do you mean in menu.lst? Sorry... Question
 
 View user's profile Send private message  
Reply with quote Back to top
sleekmason
Post subject:   PostPosted: Jul 06, 2008 - 02:25 PM



Joined: Dec 12, 2006
Posts: 194

When installing off of the live cd you have the option to install to the 'mbr' or to the partition you installed your system to. What I do that works very well is 'chainloading' the distro I am installing.

To start: When you get to the option to install to either mbr or partition, make sure you install grub to the partition of your new install, not the mbr. This means it will not affect your grub menu on start up at all, and you will have to manually edit your 'menu.lst' in grub. Here's how.

After you have installed your system and reboot for the first time you will notice that your new installation does not show up in the grub boot up screen. That is fine. The grub for your new system is installed as PART of that system and what we are going to do is point to that. Anyway, once you are on your desktop (i'm assuming kde but it is the same for xfce) goto menu/system and look for the entry that will open your file manager as 'super user' Click on it. Enter your root password then inside your file manager goto file system/boot/grub/menu.lst.

Down at the very bottom you will see a line that says:

### END DEBIAN AUTOMAGIC KERNELS LIST
right after that make an entry that looks like this:

title sidux
root (hd0,4)
chainloader +1

Where root is the partition where you have grub installed for your new system. In using this remember that the numbers listed for root (hd0,4) are one less than the partition. In other words, my second sidux is located at hda5, but for this application it will be hd0,4 If I had installed to hda9 it would be:

title sidux
root (hd0,8)
chainloader +1

If your drive is hdb instead of hda it would be:
title sidux
root (hd1,8)
chainloader +1 . . .where the number 0 or 1 is hda or hdb

That it. Now when you reboot you will see a new entry for sidux in the grub menu, and when you click on it it will bring you to another grubmenu . . . for your new system. Works like a charm.

I've tried to keep this as simple as possible. check out this post for more info on grub in the forum: http://www.sidux.com/PNphpBB2-viewtopic-t-10702.html
And this for the manual: http://manual.sidux.com/en/sys-admin-gr ... -grub-boot Also just look through installation in the forum and you will find loads more. Hope this helps!

_________________
You've made it all the way to sidux. Sit down, rest a while:)
 
 View user's profile Send private message  
Reply with quote Back to top
tuxracer
Post subject: grub; dedicated grub partition?  PostPosted: Jul 06, 2008 - 07:29 PM



Joined: Jan 16, 2008
Posts: 90

Status: Offline
This isn't exactly what you're saying but how does this idea compare to yours?:
If I have a dedicated grub partition, could I do this?:

-Use a grub command that lets me install it wherever I want: grub-install /dev/hda1 (to install to hda1 root for example)
That is step #1

Step #2: Copy the files: stage1, stage2, menu.lst and stage1_5 since I will be using file systems other than ext3 such as NTFS (Windows XP).

I can copy stage1 and stage2 from /boot/grub from any Linux LiveCD or installed/booted Linux OS?

Now I'd need stage1_5 files. I use the same source (so whatever distro I chose to use) and copy the stage1_5 files to the grub partition.

I'm not sure how to do this, though.

Step #3: create the menu.lst. I'm hazy on this part, too, unfortunately. In this example, create /mnt/test/boot/grub/menu.lst.

Get the boot info (the menu.lst from each particular distro) from the other distros and copy/write them into the new menu.lst of the grub partition.

Step #4: Once, I've made the menu.lst on the grub partition, with boot info from every distro on the drive, I need to make so the menu file is utilized when the drive boots up. I need to tell the hard drive's MBR to look at the grub partition when the drive boots up. If my grub partition is at /dev/hda1, I run these commands:

# grub
grub> root (hda0,0)
grub> setup (hd0)
grub> quit
# reboot

Step#5: To add new distros, I edit the grub partition's menu.lst. And add the boot info from the latest distro addition. I boot into the latest distro and sign in as root.

1. Mount /dev/hda1 /mnt/test
2. cd /mnt/test/boot/grub
3.cp -p menu.lst menu.lst.bup (bup???)

Edit menu.lst

In menu.lst, delete all 'global info' (what is 'global info?') and save/quit

Run Grub (# grub → grub> ) and do this:
1.grub > root (hd0, 0)
2.setup (hd0)

Reboot computer – menu.lst should include all boots (old and new)

What do you think? Is there anything there to modify or is anything not accurate or?

I'm getting my info/knowledge from the 'dedicated grub partition' page.
 
 View user's profile Send private message  
Reply with quote Back to top
sleekmason
Post subject: RE: grub; dedicated grub partition?  PostPosted: Jul 06, 2008 - 10:15 PM



Joined: Dec 12, 2006
Posts: 194

you are way over complicating things. If I understand correctly you have mepis installed already and have the mepis bootloader installed to the mbr. That is fine. When you install sidux you will be presented with an option to install the bootloader into the mbr or the root partition. You must use the root partition in order to leave your current (mepis) boot menu screen alone. From there you do what I listed above to your menu.lst IN MEPIS. Mepis currently owns the mbr so we access it through mepis's menu.lst. Does that help?

_________________
You've made it all the way to sidux. Sit down, rest a while:)
 
 View user's profile Send private message  
Reply with quote Back to top
slh
Post subject: RE: grub; dedicated grub partition?  PostPosted: Jul 06, 2008 - 10:37 PM



Joined: Nov 25, 2006
Posts: 2571

Status: Online!
Quote:
You must use the root partition in order to leave your current (mepis) boot menu screen alone.
While this is valid in theorie, you can't avoid updating the MBR if it doesn't support ext3 with 256 byte inodes yet (this bugfix has been added in 2008-01 Νυξ, Fedora 9, OpenSuSE 11.0, Ubuntu 8.04 Hardy Heron and cannot be expected in distros released before march 2008).
 
 View user's profile Send private message  
Reply with quote Back to top
tuxracer
Post subject: Re: RE: grub; dedicated grub partition?  PostPosted: Jul 06, 2008 - 11:08 PM



Joined: Jan 16, 2008
Posts: 90

Status: Offline
sleekmason wrote:
you are way over complicating things. If I understand correctly you have mepis installed already and have the mepis bootloader installed to the mbr. That is fine. When you install sidux you will be presented with an option to install the bootloader into the mbr or the root partition. You must use the root partition in order to leave your current (mepis) boot menu screen alone. From there you do what I listed above to your menu.lst IN MEPIS. Mepis currently owns the mbr so we access it through mepis's menu.lst. Does that help?

Well, it does help but MEPIS *used to* be the main grub/boot loader. When I installed Debian - Lenny, the new Debian install now has the bootloader.

I suppose your post still applies, right? After installing sidux, I install grub to the root partition so it leaves the Debian boot menu alone? Then I edit /boot/grub/menu.lst with what you listed above? When I installed Lenny, I installed it to the MBR so it took over the mbr from Mepis. Right? I just want to make sure I understand things correctly.

Quote:
While this is valid in theorie, you can't avoid updating the MBR if it doesn't support ext3 with 256 byte inodes yet (this bugfix has been added in 2008-01 Νυξ, Fedora 9, OpenSuSE 11.0, Ubuntu 8.04 Hardy Heron and cannot be expected in distros released before march 2008).

So, can I install Kubuntu 8.04 and Fedora 9 to root and do the same (as you described above)? That would be really convenient. I am not sure though as I heard/read that you have to do some extra editing/tweaking when you install Fedora.

Thanks for your help, sleekmason!
 
 View user's profile Send private message  
Reply with quote Back to top
tuxracer
Post subject: RE: Re: RE: grub; dedicated grub partition?  PostPosted: Jul 06, 2008 - 11:14 PM



Joined: Jan 16, 2008
Posts: 90

Status: Offline
Here's my current menu.lst (I took out most of the comments #):

title Debian GNU/Linux, kernel 2.6.24-1-686
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-1-686 root=/dev/sda8 ro quiet
initrd /boot/initrd.img-2.6.24-1-686

title Debian GNU/Linux, kernel 2.6.24-1-686 (single-user mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-1-686 root=/dev/sda8 ro single
initrd /boot/initrd.img-2.6.24-1-686

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda7.
title MEPIS at sda7, newest kernel (on /dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz root=/dev/sda7 nomce quiet splash vga=791 resume=/dev/sda6
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda7.
title MEPIS at sda7, kernel 2.6.22-1-mepis-smp (on /dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz-2.6.22-1-mepis-smp root=/dev/sda7 nomce quiet splash vga=791 resume=/dev/sda6
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda7.
title MEMTEST (on /dev/sda7)
root (hd0,6)
kernel /boot/memtest86+.bin
savedefault
boot
 
 View user's profile Send private message  
Reply with quote Back to top
sleekmason
Post subject: RE: Re: RE: grub; dedicated grub partition?  PostPosted: Jul 07, 2008 - 01:57 AM



Joined: Dec 12, 2006
Posts: 194

Yes, basically the menu.lst in lenny would be what you want to change. It looks like you are already using a chainloader for windows so you can use that as an example as well (for the numbers to use i.e. hd0,2.) Good luck:)!

_________________
You've made it all the way to sidux. Sit down, rest a while:)
 
 View user's profile Send private message  
Reply with quote Back to top
dptxp
Post subject: RE: Re: RE: grub; dedicated grub partition?  PostPosted: Jul 11, 2008 - 07:12 PM



Joined: Dec 06, 2007
Posts: 310
Location: New Delhi
Status: Offline
chainloading is perhaps the simplest option.

check this thread-

http://sidux.com/PNphpBB2-viewtopic-t-1 ... art-0.html

_________________
http://linux.ixcodes.com
In a lunatic asylum, everyone thinks that he is the doctor.
 
 View user's profile Send private message  
Reply with quote Back to top
tuxracer
Post subject:   PostPosted: Jul 14, 2008 - 01:37 PM



Joined: Jan 16, 2008
Posts: 90

Status: Offline
sleekmason wrote:
That it. Now when you reboot you will see a new entry for sidux in the grub menu, and when you click on it it will bring you to another grubmenu . . . for your new system. Works like a charm.

Hey, I understand way more what's happening here.

One question, though. When it boots again to show the sidux grub, is that all that the sidux grub menu will show?

There will be an extra step or showing of grub twice. But, it does sound simple to just chain load each additional operating system.

The alternative is one long list in menu.lst of the grub you install in the MBR, right?
The list will be long anyway but it will be even longer if you include entries for older kernels etc. Whereas, the chainloading method has grub entries for those somewhere else in grub of the other OS?

Chainloading is just having one grub hand over the boot to another grub or bootloader, I gather.

Hmmmm....
 
 View user's profile Send private message  
Reply with quote Back to top
tuxracer
Post subject:   PostPosted: Jul 14, 2008 - 02:02 PM



Joined: Jan 16, 2008
Posts: 90

Status: Offline
Hey, sorry to post again but I think I have a good question. I am wondering how you would 'fix' this situation: if the distro you use as your main grub (i.e. it has the chainloader entries) is borked or you want to reinstall, how do you handle that?

I suppose a LiveCD can fix a 'broken' grub or if that particular OS is not booting properly. But, if you wanted to reinstall for some reason, that would wipe out the previous grub entries (i.e. the chainloader entries) so you would either have to redo or have a backup of the grub.conf (menu.lst) file? If you have a backup, you just copy it to the new file whenever you complete the new install? Or would they be effected at all?
 
 View user's profile Send private message  
Reply with quote Back to top
dsmithhfx
Post subject:   PostPosted: Jul 14, 2008 - 02:47 PM



Joined: May 02, 2008
Posts: 126

Status: Offline
You'll find everything you need to know about how to create a basic grub floppy (that will get you to a grub command line), and how to use that to boot your system here:

http://www.troubleshooters.com/linux/grub/grub.htm

Otherwise, google on "grub" for all sorts of useful info.

I keep an up-to-date, full grub floppy (will all my bootable partitions tested working from it) on hand, along with an image of the floppy stored on other pcs, for just such an eventuality...
 
 View user's profile Send private message  
Reply with quote Back to top
sleekmason
Post subject:   PostPosted: Jul 14, 2008 - 04:03 PM



Joined: Dec 12, 2006
Posts: 194

Yes, I think you understand now.

The best thing to do is just make a copy of your menu.lst for future installs.

Hard to say which is best about either loading all into 1 menu.lst or using the chainloader, but with all the changes and probs with grub it just seems to be the easiest solution to me to use the chainloader. I have done both and even used lilo before(another boot loader) with satisfaction.

As far as how to reinstall grub you may look here: http://manual.sidux.com/en/sys-admin-gr ... -grub-boot and search the forums for more specific problems. I believe I asked the same thing about 1 year ago, and I think I've seen it several times since.

_________________
You've made it all the way to sidux. Sit down, rest a while:)
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
 
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2006-2008 by sidux e.V., 10407 Berlin, Kniprodestr. 104. sidux e.V. is a Berlin, Germany based non-profit foundation. Consult Impressum and Legal Terms for details. sidux™ is Free Software released under the GNU/GPL license and other compatible licenses.
powered by Zikula & Zafenio