You are not logged in.

#1 2006-06-18 14:21:49

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Installing GRUB on a USB stick

I know this is spectacularly stupid, but how do I properly install GRUB on a USB stick using grub-install? Last time I tried it (using info from a web page on Knoppix), I screwed up and things got mounted wrong...

(Although that was with Minimax, an amazing piece of crap that stores the whole OS on a 32 megabyte initrd.)

Offline

#2 2006-06-18 14:33:47

tomfitzyuk
Member
Registered: 2005-12-30
Posts: 89

Re: Installing GRUB on a USB stick

I've installed GRUB onto a floppy disk (which is extremely useful) for booting into Arch after reinstalling Windows (which installs its own boot loader).

It might not work for a USB drive but I figure it may help:

[tom@tomscomputer floppy]$ pwd
/mnt/floppy
[tom@tomscomputer floppy]$ sudo ls -R
.:
boot  lost+found

./boot:
grub

./boot/grub:
stage1  stage2  stage2_eltorito

./lost+found:
[tom@tomscomputer floppy]$

It has a lost+found directory because it's filesystem is ext2/3.

Now, whenever I want to boot using the floppy I just change the boot order in the BIOS and it will boot into command-line GRUB.

From this I can either load my config file from my boot partition on my hard drive or load the kernel using the appropriate commands.

In fact, here's the guide I followed:
http://gentoo-wiki.com/TIP_Bootable_Floppy_with_GRUB

Offline

#3 2006-06-18 15:00:56

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Installing GRUB on a USB stick

Ah, thanks... But how would that work with the root being /dev/sda1 and setup on /dev/sda?

Offline

#4 2006-06-18 21:05:37

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: Installing GRUB on a USB stick

if im not mistaken, i used :

mount /dev/sdc1 /mnt
grub-install --root-directory=/mnt /dev/sdc

and the edited my /mnt/boot/grub/menu.lst

Offline

#5 2006-06-18 23:15:00

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Installing GRUB on a USB stick

Yup, got it. Thanks.

(Of course it's not much help when the distro involved actually checks to see that you've got a CD in your machine after the install system has booted up, even with the image that is specifically labeled as being for FTP installs. The *nix world is not kind to those without CD burners, which as it happens is one of the reasons I glommed on to Arch.)

Offline

#6 2006-06-18 23:27:22

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: Installing GRUB on a USB stick

yep, and i said it on the ML once, although i know it sounds weird, but im using k/qemu for those kind of things...

and ofcourse, Archie does honor usb booting wink oh well, who knows, maybe we WILL get to see 0.6rc3 one of those days (dtw! i hope u reading this! :twisted: )

Offline

#7 2006-06-19 00:00:35

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Installing GRUB on a USB stick

Well, not honoring USB installations is kind of criminally stupid, no? I mean, if everything needed for the install is loaded into memory already, what's the point of checking for installation media? If the install system has booted and the installation scripts are available that probably means there is a drive somewhere that it was loaded off of, right? And if everything was loaded into RAM, why would the presence of that drive even matter? It just does not make sense. :?

Offline

#8 2006-06-19 07:38:28

benplaut
Member
Registered: 2006-06-13
Posts: 383

Re: Installing GRUB on a USB stick

this is giving me an idea -

install linux on school computers... nobody would know they were there without a bootloader (active directory, HDD isn't used)

>:D

Offline

#9 2006-06-19 14:41:02

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Installing GRUB on a USB stick

They'd probably figure out that something fishy was happening when they noticed that some HDD space had vanished...

(FWIW the bug I was complaining about is now fixed. Here goes...)

Offline

#10 2006-06-19 22:10:36

benplaut
Member
Registered: 2006-06-13
Posts: 383

Re: Installing GRUB on a USB stick

Gullible Jones wrote:

They'd probably figure out that something fishy was happening when they noticed that some HDD space had vanished...

our sysadmin is a dodo  yikes

Offline

#11 2006-06-20 18:46:18

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Installing GRUB on a USB stick

Well Frugalware turned out to be less than satisfying - poor hardware detection (don't ask, they use uevents like we do :? ), SysV initscripts (bluaaghh!), base system doesn't include GCC and other stuff for compiling things, rather annoying grouping of software in the repos. It's not a bad distro at all, though it could probably use a few more developers, but it really is just not my cup of tea.

Offline

Board footer

Powered by FluxBB