LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 06-24-2007, 09:21 PM   #1
comcastuser
Member
 
Registered: May 2004
Posts: 140

Rep: Reputation: 22
How do you make a usb drive bootable?


I have an 80gb usb drive with 1.8gb swap on partition 2 and the rest is ext3 on partition 1.

I just copied an existing and working Linux filesystem over to this partition and used gparted to mark partition 1 as a boot partition.

Is there something I need to do with grub? I've read the readmes and manuals, but I'm hopelessly lost trying to interpret this as far as making a usb drive boot right to the linux kernel within (and I don't want to mess with the host computer's boot sector).

Any advice? Thanks!
 
Old 06-24-2007, 09:35 PM   #2
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
change your BIOS to boot off of it
 
Old 06-24-2007, 09:37 PM   #3
comcastuser
Member
 
Registered: May 2004
Posts: 140

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by AceofSpades19
change your BIOS to boot off of it
I already did that.

But how do I use grub to make it actually boot into Linux?

Do I need to do something with the menu.lst file?
 
Old 06-24-2007, 11:27 PM   #4
lakris
Member
 
Registered: Sep 2004
Location: Stockholm, Sweden
Distribution: Ubuntu, RedHat, SuSe, Debian, Slax
Posts: 102

Rep: Reputation: 15
It depends on several things.
When You say copy, how did You copy? dd, rsync, cp?
It isn't too much messing with boot system on the original. An easy way would be to just add an entry to the end of Your existing boot loaders /boot/grub/menu.lst file, You can try something like this:
Code:
title           My Old Linux
root            (hd2,0)
kernel          /boot/your-vmlinuz-name root=/dev/sdc1 ro quiet splash
initrd          /boot/your-initrd.img-name
quiet
savedefault
...and reboot. You wont lose Your old settings. You need to change the (hd2,0) and /dev/sdc1 to what You actually have and the filenames. (hd2,0) means Your third harddisks first partition. Check /var/log/syslog or /var/log/messages for info on what drives You have.
 
Old 06-25-2007, 02:19 AM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
You must do the following to boot a distro, originally installed in another disk, in the 1st partition of an external hard disk

(1) Edit menu.lst so that (a) the partition and disk numbers correspond to the USB disk position and this should be (hd0,0) and (b) amend the "kernel" statement with the parameter "root=" corresponding to the new partition reference. For example the 1st partition of a bootable USB disk would be sda1 but your Linux may be installed in device hda3. The change should therefore from root=/dev/hda3 to root=/dev/sda1.

(2) Do the same as Item 1b for /etc/fstab

(3) Edit /boot/grub/device.map to reflect the (hd0) is now sda

(4) Restore the boot loader. Say boot up by a Live CD and activate a Grub shell in root console the command would be
Code:
grub
root (hd0,0)
setup (hd0)
quit
reboot
Your Linux should now boot
 
  


Reply


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make usb thumb drive bootable with Redhat enterprise linux 3 niranjan_mr Linux - Hardware 2 11-05-2006 04:47 PM
Make usb hard drive bootable jmdlcar Slackware 5 08-06-2006 03:27 AM
make a USB stick bootable lothario Linux - Software 1 07-13-2006 01:02 PM
Make a bootable Flash drive with Sandisk loninappleton Linux - Hardware 2 02-06-2006 03:02 PM
can you make a usb drive bootable? citrus Linux - Newbie 4 05-16-2004 04:00 AM


All times are GMT -5. The time now is 02:39 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