LinuxQuestions.org
Review your favorite Linux distribution.
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
 
Search this Thread
Old 06-07-2009, 06:13 AM   #1
Phoxis
Member
 
Registered: Feb 2008
Location: India, Kolkata
Distribution: Fedora 16
Posts: 59

Rep: Reputation: 16
Booting GNU/Linux from USB


I have made a USB drive bootable with syslinux and kept some linux distros like dsl, geexbox, puppylinux, and such. I have made a similar multiboot device with CD and it succeeded. When i boot the USB and select an OS, the kernel executes but cannot find the OS files. Like dsl cannot find the cloop file , geexbox cannot load the 2nd stage. I have tried changing the boot parameters to boot from usb (as needed for the corresponding oses).
My question is how can i make an OS bootable from a USB drive (manually with syslinux). What kind of boot parameters i have to use to tell the kernel that the files are in the USB drive. I mean do i need to set the UUID for the USB drive?
Please also let me know, if setting the UUID for the disk will work elsewhere. And if setting UUID will work then how can i get the UUID of the USB drive i am using. i tried ls /dev/disk/by-uuid but i cannot understand which one is the USB drive as a lot of them is shown.
 
Old 06-07-2009, 06:42 AM   #2
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,060

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Check it out, post the output of "mount" while the usb is mounted.
Post the output of "dmesg | tail" also and as Root enter "fdisk -l"
and post that too.

Other things to consider: how did you install syslinux, from Windows or Linux?
And for now, let's concentrate on DSL and get it booting, then deal with any others.

And, on what kind of computer are you trying to boot from, it's specs?
 
Old 06-07-2009, 10:18 AM   #3
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS6
Posts: 267

Rep: Reputation: 57
"blkid" gives the UUIDs.

Dave
 
Old 06-08-2009, 10:25 AM   #4
Phoxis
Member
 
Registered: Feb 2008
Location: India, Kolkata
Distribution: Fedora 16
Posts: 59

Original Poster
Rep: Reputation: 16
i have installed syslinux from fedora 10 i386. My USB is booting fine. I am able to boot most of the distros from USB. DSL and geexbox seems to have some problems. I have checked the linuxrc scripts and found some command line parameters and i think they might work. I will try them soon. I found out that there is a nocd parameter for DSL. If you suggest some proper command line params then it would be good, else i would have to go through a lot of shell scripts.
I understood the UUIDs. But is using a UUID for booting will be portable? There will be a need of changing of UUID if i change the USB (make another one).
Thanks for the reply
 
Old 06-08-2009, 11:04 AM   #5
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,060

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
So, everything is OK or what?
 
Old 06-09-2009, 08:52 AM   #6
Phoxis
Member
 
Registered: Feb 2008
Location: India, Kolkata
Distribution: Fedora 16
Posts: 59

Original Poster
Rep: Reputation: 16
As i told i am having problem booting DSL and GeexBox from USB drive. They boot okay from CD/DVD.
I gor into the init script of GeexBox and i saw that it searches for GEEXBOX (uppercase) directory in the device. But whenever i copy the GEEXBOX dir in the fat32 USB drive it becomes lowercase automatically. renaming doesnot helps (says there is already the directory with the uppercase name). After geexbox drops me into the limited shell, i see that the name is lowercase there.
I think i this might be a problem of geexbox booting. I didnot find any boot parms for geexbox to show the directory. And i think it is not possible without changing the script, because it is defined in the script and no commandline is allowed to override it.

The fromhd boot parameter of dsl didnot work for the usb boot.

I need to boot GeexBox and dsl from usb disk. That is my problem at this moment.
 
Old 06-09-2009, 09:14 AM   #7
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,060

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
I have had that exact same problem on my usb when playing with DSL in Ubuntu; it would rename DSL to dsl and then I'd have issues.
No idea what causes it?
However; I usually moved (cut/paste) the dsl folder off usb, to my Desktop, Chowned the usb with
"sudo su"
"chown -R bz /media/usb0" where bz is my username and /media/usb0 is where it's mounted.
Then renamed dsl to DSL and moved it back to usb, then all was good.

You may want to try partitioning usb; first partition as ext2, bootable.
2nd partition FAT32 for exchanging files between linux and windows.
Then install grub to usb-it will boot faster and will even boot on pc's that won't boot off usb if you use plop bootmanager cd or floppy. ( http://www.plop.at/en/bootmanager.html )

To install grub to usb is really easy!
1st DIS-CONNECT your hd from motherboard; set bios to boot from usb, if it can.
Use any ubuntu livecd and boot livecd
insert usb once ubuntu desktop loads.
assuming usb already parttioned, etc
make boot/grub folders on usb and copy grub files from cd to usb
"mkdir -p /mnt/usb/boot/grub" (where /mnt/usb" is mountpoint- could be /media/disk or /media/usb0
"cp -a /usr/lib/grub/i386-pc/* /mnt/usb/boot/grub/"
Then use nano to create menu.lst unless you already have one.
"nano /mnt/usb/boot/grub/menu.lst"

Then install grub to usb as if to hd
"sudo su"
"grub"
"root (hd0,0)"
"setup (hd0)"
"quit"
All should be good.
You can use my menu.lst from my site, simply edit out the tinycore entries and put dsl/geexbox entries there.
also edit out menu colors and splashimages unless you download and put into /boot/grub/
( http://multidistro.com/downloads/tc_...c_flavors.html )

NOTE, using grub a dsl syslinux.cfg entry will change-
syslinux.cfg dsl entry

label dsl
kernel /boot/linux24
append initrd=/boot/minirt24.gz quiet restore=hda1 mydsl=hda1 etc etc etc

change to this for grub; put append line at kernel line

title dsl
kernel /boot/linux24 quiet restore=hda1 mydsl=hda1 etc etc etc
initrd /boot/minirt24.gz

Dig?
That may solve your problem-booting geexbox off ext2 it will not re-name it.
 
Old 06-13-2009, 09:20 AM   #8
Phoxis
Member
 
Registered: Feb 2008
Location: India, Kolkata
Distribution: Fedora 16
Posts: 59

Original Poster
Rep: Reputation: 16
passing the UUID of the USB drive works for GeexBox. After i went through the linuxrc script, it was clear that it cannot detect drives automatically.

But still DSL doesnot boot from USB, it cannot find the cloop. I have tried loading the USB drivers manually. Does this depend upon the system hardware. I dont think so, at least in my case.
 
Old 06-13-2009, 09:30 AM   #9
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,060

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
wait here, i'm gonna help, gotta do something...
 
Old 06-13-2009, 09:32 AM   #10
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,060

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
You still using fat32/syslinux usb?
or grub/ext3?

anyway post either menu.lst or syslinux.cfg?
 
Old 06-14-2009, 06:27 AM   #11
Phoxis
Member
 
Registered: Feb 2008
Location: India, Kolkata
Distribution: Fedora 16
Posts: 59

Original Poster
Rep: Reputation: 16
I have a fat32 USB drive and i have used both syslinux and grub to make it bootable. Both of them are working fine.


For syslinux i used
Code:
LABEL dsl
	MENU LABEL Damn Small Linux
	KERNEL /boot/dsl/linux24 ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 knoppix_dir=dsl/ nomce noapic quiet BOOT_IMAGE=knoppix
	APPEND initrd=/boot/dsl/minirt24.gz

For GRUB i used
Code:
title DSL
	kernel /boot/dsl/linux24 ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 knoppix_dir=dsl/ nomce noapic quiet BOOT_IMAGE=knoppix
	initrd /boot/dsl/minirt24.gz
i have tried the fromhd boot parm. Doesnot work. One thing i should tell, when i boot from the USB drive through virtual machine with the USB drive set as an IDE drive of the virtual machine DSL boots.
 
Old 06-14-2009, 06:39 AM   #12
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,060

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
I also have issues with DSL "finding itself" sometimes.
Two options I use Dog-

1) Put the kernel/initrd in the root of USB, meaning / instead of /boot/dsl/linux24
I've noticed that the kernel/initrd likes to be there...

2) also "knoppix_dir=dsl/", never used the / before.

3) also, you have knoppix_dir=dsl boot_image=knoppix; I always use
knoppix_dir=DSL KNOPPIX_DIR=dsl BOOT_IMAGE=KNOPPIX which works good.

Also, Is your usb partitioned?
if so, how?
 
Old 06-16-2009, 06:14 AM   #13
Phoxis
Member
 
Registered: Feb 2008
Location: India, Kolkata
Distribution: Fedora 16
Posts: 59

Original Poster
Rep: Reputation: 16
It is really strange now.
I made the USB bootable with GRUB (fat32), and then booted DSL with it along with the knoppix_dir=dsl (the cheatcodes say to always include the trailing "/", though i have omitted this time), and fromhd boot param, but this time i booted from another computer and after which dsl booted properly, only the mouse was not working.
And the strange thing is the syslinux+fat32 usb which was booting in my computer it says boot error 15 in the other computer.
 
Old 06-16-2009, 06:47 AM   #14
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,060

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
you using grub for DOS?
did you try putting kernel/initrd in top of usb?
that usually works for me...

maybe try my linuxLiveusb as it's already setup and all you gotta do is put it on usb and reboot, long as syslinux is installed to usb.
LinuxLive-USB 500MB
Has-
DSL-4.4.10
DSL-N-01RC4
Feather-0.7.5
Slitaz-latest "cooking" version
Puppy-4.2
NetbootCD-2.2 Which can Net-install
Ubuntu-6.06-9.04
Debian-stable/testing/unstable
Fedora-7-10 + testing
openSUSE-10.3/11/11.1/+ factory
Mandriva-2008/2009/cooker/current
CentOS-4/5 latest
Slackware-12.1/12.2/current
( http://multidistro.com/downloads/und.../under1gb.html )

more stuff, if you make usb ext3, install grub to usb, it's almost guaranteed to work...
 
Old 06-18-2009, 04:25 AM   #15
Phoxis
Member
 
Registered: Feb 2008
Location: India, Kolkata
Distribution: Fedora 16
Posts: 59

Original Poster
Rep: Reputation: 16
Thanks for the link. You are doing a good job. Actually i am working on an article and want to be as flawless as possible. I am avoiding GRUB4DOS. I am sticking with GRUB and SYSLINUX. I think i have solved the issues. Thank you very much linux72 for your support. After i complete the writeup i will post the link here.
 
  


Reply

Tags
multiboot, usb


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Running Debian GNU/Linux from an encrypted USB drive LXer Syndicated Linux News 0 02-19-2008 11:11 AM
Can't install GNU/Linux after connecting external USB harddrive. NomDeGuerre Linux - Newbie 23 01-15-2008 02:09 AM
Booting linux from USB when BIOS cannot boot from USB zani Linux - Laptop and Netbook 0 08-08-2006 01:47 AM
Booting Linux on USB disk? JF1980 General 13 06-28-2005 08:58 AM
Booting Linux off of a USB drive hari69 Linux - Laptop and Netbook 0 10-23-2004 10:08 AM


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