Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Boot USB-stick from grub on hdd.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
RobertDavid
Apprentice
Apprentice


Joined: 08 Aug 2005
Posts: 271
Location: Czech Republic

PostPosted: Fri Oct 20, 2006 6:04 pm    Post subject: Boot USB-stick from grub on hdd. Reply with quote

I have a notebook which is impossible to boot from USB:( and also it has no CDROM permanently so want sometimes boot there from my USB-stick livecd,, My idea is if I could modyfy grub on the notebook to link me on USB (where is also GRUB but it doesnt matter to pass twice grubs), just something like during windows booting?!???
_________________
Arch & Fluxbox & 2.6.24-rc-zen!!!!
robertek.brevnov.net
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54979
Location: 56N 3W

PostPosted: Fri Oct 20, 2006 6:18 pm    Post subject: Reply with quote

RobertDavid,

Your kernel will have to be on the laptop hard drive. This is because grub uses the BIOS to get started and if the BIOS cannot see the USB stick, neither can grub.

Everything else can be on the USB stick.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
RobertDavid
Apprentice
Apprentice


Joined: 08 Aug 2005
Posts: 271
Location: Czech Republic

PostPosted: Fri Oct 20, 2006 7:38 pm    Post subject: Reply with quote

I have realizet that you have right, but there is another problem how to set a root correctly??

My settings is

Code:

......
......
......
title USB
root (hd0,0)
kenrnel (hd0,0)/usb root=/dev/ram0 init=/linuxrc looptype=squashfs loop=/image.squashfs cdroot
initrd (hd0,0)/usb.igz


this is just old livecd grub settings transfered to hdd, but where to specify that the livecd.squashfs is on /dev/sdc1 or how to specify that the initrd is on /dev/sdc1 ??? (I have just transfered kernel and initrd to hdd)
_________________
Arch & Fluxbox & 2.6.24-rc-zen!!!!
robertek.brevnov.net
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54979
Location: 56N 3W

PostPosted: Fri Oct 20, 2006 9:51 pm    Post subject: Reply with quote

RobertDavid,

If you really want an initrd, that must be on the laptop hard drive too, since its really part of the kernel and is loaded by grub.

The title= line is for you, it puts text into grubs menu
The root (hd... tells wher /boot is, it must be on your hard drive, nou on usB.
The kernel line tells what kernel you want to load.
You will need rootdelay=<secs> at the end of the kernel line, where secs is a time beterrn 7 and 30 seconds to allow the kernel to set up the USB interface, so it can use it to mount root.
The initrd line tells grub to load a file to be used as a fake root filesystem

Since you need to build your own kernel to mount root on USB, you may as well build in everything you need for booting and not bother with the complication of an initrd.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum