LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-24-2006, 04:54 PM   #1
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
boot from grub on cd to grub elsewhere


Hi

I'd like to use grub on a cd (or preferably a usb stick) to boot to grub somewhere else (in my case /dev/sda5).
I have a work laptop that I really don't want to mess with the MBR of which is running WXP, but it has loads of space on the hard drive which I'd like to install a linux (or two) on. So if I installed grub on a cd (or usb stick) and aimed it at /dev/sda5 (but have to work out where that is in grub language), then had grub installed on that partition, then whenever I made changes to the linux(es), I would only change the grub setup on sda5, and not on the cd. To be clear, the aim is not to boot a kernel with the grub on the cd (or usb stick), but to boot another instance of grub. Is this possible?

So the cd (or stick) would just be a key, which would allow access to /dev/sda5, and would work for whatever I setup in grub in sda5. And without the key, WXP would boot in blissful ignorance of the power above.

So, the bits I can't yet figure...
Is this chainloading? Like what grub does to get Windows loaded?
So I'd use chainloader in grub on the cd? But point it where?
And does this mean a logical partition has a boot record of its own to load grub into? So I just install grub onto that partition, not that disk MBR? But then that goes back to the question of where to point the chainloader command on grub on the cd.
Do I need to makeactive the linux boot partition, and if I do, will this stop WXP from booting if the machine is booted without the CD (this I really don't want)?

Also am I right in thinking that WXP won't see any linux ext2, ext3 or swap partitions?

Normally I'd just blast away and get there in the end, but I don't want to have to go back to the excellent IT support staff and tell them I've broken the new toy so quickly and ask could they please reinstall all that lovely network software. So this time I will be careful and know what I'm doing before I do it. I really don't want any interaction with the Windows partition when I do this (including unsetting its active state, if that has any meaning).

right, back to reading manuals - any guidance appreciated
 
Old 03-24-2006, 05:06 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
What is known to work: Make a boot floppy with grub on it---that is how my home system works.

Also, you might look at the "Ultimate boot CD"---I think (not sure) that their site has suggestions for setting up OSes so that this CD sees them.

You can configure the **Windows** bootloader to boot other OSes. You edit a little file called "boot.ini" Advantage of this is that it is easy to keep a backup of this file for restoring if you make a boo-boo.

For the ultimate in multi-booting tips, Search on "Saikee" here and look in his sig.
 
Old 03-24-2006, 07:34 PM   #3
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Original Poster
Rep: Reputation: 30
cheers for the signposts

can't use a floppy - haven't got a drive
but i'll do what you suggest on a cd as a beginning.
i have a slax cd image that is very easy to modify - easier than building my own - think it uses grub, so just have to change the menu.lst (i hope)

i'm pretty sure that it's going to be something like this:

title linux
root (hd0,5)
chainloader +1
boot

(hd0,5) is hda6 on this thing

then do a grub-install onto hda6

lets see how much plastic i can turn into frisbees
 
Old 03-25-2006, 04:20 PM   #4
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Original Poster
Rep: Reputation: 30
hooray - done it

put grub onto a USB stick, which chainloads grub on a hd partition. this leaves my work Windows install with its MBR untouched.

the USB stick is now just a key, if it's not in at boot then Windows loads from the MBR.

any changes to menu.lst are made to the one on the hard-drive partition.

one small, but annoying, complication. when you boot to the stick, grub calls it hd0, so the hard drive becomes hd1. so if you do any autoupdating of menu.lst with package managers, you need to change the automagicked
root (hd0,X)
to
root (hd1,X)
else grub won't find your kernel/initrd

this may also be the reason that Windows didn't want to be chainloaded using this method (but I don't care about that, cause I can boot it the old-fashioned MBR way)
there might be a way around this that involves whipping the usb stick out before it chainloads the second instance of grub, but i'll be happy with this for a while i think

if anyone ever follows this thread, look where pixellany said in the post 2 up from this one, that Saikee is a grub-booting guru, also read the grub manual. there are a couple of ways to do it.

the partitioning/formatting of the usb stick so it would be bootable was most challenging for me. i tried qtparted first, then cfdisk, then finally fdisk. again, there's plenty written on the topic. ask me if you can't find the way.
 
  


Reply



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
gentoo : grub: The file /boot/boot/grub/stage1 not read correctly Boudewijn Linux - Software 3 05-21-2008 03:13 AM
need to access /boot/grub/menu.lst and /boot/grub/device.map neouto Linux - Newbie 8 09-04-2005 11:45 AM
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 08:13 PM
Trying to dual-boot XP and RH9 with GRUB...GRUB stops right after BIOS EvilYoda Linux - Newbie 5 06-20-2003 03:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration