LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-24-2005, 01:14 AM   #1
kylnj
Member
 
Registered: May 2005
Posts: 37

Rep: Reputation: 15
install linux on a usb drive


hi

can i install linux on a usb drive free partition?
thanks

tom
 
Old 05-24-2005, 03:59 PM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Yes. However, assuming that you want to boot from it, you should confirm that your mobo supports a USB device as a booting option. Not all mobos do. -- J.W.
 
Old 05-24-2005, 07:48 PM   #3
kylnj
Member
 
Registered: May 2005
Posts: 37

Original Poster
Rep: Reputation: 15
tks jw,

but...
since my 1st drive has xp on it and has no space left.
i boot into linux from cd and start the installing steps...
during the early steps, it only show the primary drive... which i dont want to wipe it out(no space left either). it didnt show the free space on the usb drive where i want the linux to reside, and later on to boot from it!!!!

any comments?
 
Old 05-25-2005, 12:56 AM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Your USB drive probably isn't mounted, or there are no partitions available on it. What partitioning scheme are you using on the USB? -- J.W.
 
Old 05-25-2005, 01:28 AM   #5
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Statement amended because of false premise (I thought that I was still in the SuSE lq forum)

First off, which distro are you using (what "version" of linux)?

It sounds like the modules needed for the installer to see the usb drive are not loaded. You may be able to switch to a different tty and load them (it depends on the distro you're installing).

When the install is done, you may find that you need a custom built initrd (one that has the usb drivers in it). You will probably find out if this is an issue when you boot. It will probably tell you something like "cannot mount root file system".

Stick with it. It can be done.

Last edited by gd2shoe; 05-25-2005 at 01:49 AM.
 
Old 05-25-2005, 06:32 AM   #6
kylnj
Member
 
Registered: May 2005
Posts: 37

Original Poster
Rep: Reputation: 15
hi jw/gd2shoe

thanks for your reply, while booting it show fedora core 2.6.9-1.667.

ok here is what i try today.( dell inspiron 1100 is what i have, biosA32--having smaller display area as well)

1. i took the usb dr(half of it is ntfs partition for my XP and the rest is free) out. swap the internal/primary dr out and successfully install and i can boot w/o problem(while it is inside as the primary--with the small display).


2. then i swap those 2 drive and set bios to boot usb dr 1st. it does pickup the usb dr and starti booting but failed with following summary:


boot fedora core 2.6.9-1.667
root(hd0, 1) ---is this correct?
file system is...
...

....
uncompressing.......ok boot kernel
red hat nash ver 4.1.18 start
reading all physical volume...

no volum group found
...
...
.
.
no volum group found


mount error 6, mounting ext3
mount error 2 " "
.
.
switchroot: mount fail 22
umount /initrd/dev fail 2
.
.
kernel panic not sync kill init



well i hope someone can figure it out ??




also, i did saw a thread about dell inspiron 1100 displaying issue has been solved by up grade bios?? or using intel 845 patch can help to get a full screen?


thanks again.

tom
 
Old 06-02-2005, 11:50 PM   #7
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
(hd0, 1) is Grub's way of saying "first hard drive, second partition". This is usually equivalent to /dev/hda2 once linux is booted. (Grub is a common boot loader used with linux. It gets the kernel and initrd into memory and allows linux to start.)

Let me see if I understand correctly. You have an external Hard drive, which is only really a laptop hard drive in a USB enabled enclosure. You swapped this drive into the laptop, installed to it, and then replaced it in it's enclosure. Does that sound right?

I find it rather odd that it booted as far as it did. It obviously started the linux kernel (you can't have a kernel panic w/o a kernel).

It also looks like the kernel can't find any physical volume. This sounds to me like it can't see the other drive in the system (let alone the USB drive). I expected a more blatent error than this, but it seems to be having trouble mounting the root file system. If this is the case, you will need a custom initrd.

This project will likely be much easier if you have a "live linux" CD, like Knoppix.

Observations by somebody else? (hopefully someone better qualified...)
 
Old 06-03-2005, 01:30 AM   #8
kylnj
Member
 
Registered: May 2005
Posts: 37

Original Poster
Rep: Reputation: 15
hi gd2,
thanks for reply.

1. it is a laptop drive(in a usb 2 ext-box) with 1st partition used as e: drive for XP(while i boot from internal drive). i install fedora 3 on the 2nd partition(hopfully i can boot from either XP or fedora).

2.question: after you set bios to boot from usb drive, do you need a special usb bootable external box or any usb box will do?

thanks
 
Old 06-03-2005, 04:23 PM   #9
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
I would expect that any USB drive which lets you write to the MBR and boot sector should work as a bootable device plugged into a computer which supports USB booting. Not all USB drives will let you do that (particularly some of the small flash drives), but I think most will. If you get the same results that you posted previously without any internal drive, then I would say that the enclosure you have is not a problem.

The trick is drivers. After the POST (power on self test), the BIOS will look for the first available bootable device on it's list, and load the MBR (master boot record) from that device into memory. In your case, this is where GRUB is installed (this is a little over simplified). Grub then provides a menu, and is intelligent enough to be able to find the drive again. Grub then loads the linux kernel and the initrd into memory, and kicks the kernel into gear.

Now, the kernel starts to initialize the hardware. Before it gets too far, it too needs to read the hard drive. The problem is, it uses a more sophisticated means to communicate with the drives and their controllers. Also, once it can talk to the drive, it needs to be able to read the drives format in order to get at the files that it needs. Each of these require drivers. Some of these drivers are typically compiled into the kernel itself. Others aren't always needed. This is where the initrd comes in.

The initrd is a package of stuff that gets put into memory and is treated as a ram disk. It contains configuration scripst and modules (drivers) that the kernel might need to have before it can talk to the hard drive. This is where I expect problems with booting off of a USB drive. I could be wrong, but I don't expect most initrd files to contain the necessary modules to communicate with a USB drive.

You can create your own initrd using the mkinitrd package. This is something which I am not terribly familiar, but could probably figure out. I think that you will need to have the usbcore and usb-storage modules in order for this to work.


Also, with the other hard disk back in the system, I would expect the root command may need to be changed to (hd1,1).

You will probably want a live linux CD to work from to diagnose/fix this. The installation disk might be enough. Generally, I recommend people use Knoppix.
 
Old 06-03-2005, 06:22 PM   #10
kylnj
Member
 
Registered: May 2005
Posts: 37

Original Poster
Rep: Reputation: 15
hi gd2

thanks for your info.
 
  


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
Can I install Linux on Western Digital USB external hard drive? priyankadeven Linux - Newbie 6 11-24-2009 09:12 PM
Linux on a USB hard drive without USB-FDD BIOS option jaro Linux - Hardware 1 07-15-2005 02:12 AM
Ok...how to install Linux (RH9 or any free distro) to USB drive? sarysa Linux - Newbie 3 11-02-2004 02:10 PM
Linux on a USB hard drive without USB-FDD BIOS option jaro Linux - Hardware 6 05-27-2004 11:49 AM
Cannot Install Bootloader, XP on hda, Linux on sdb (USB MASS STORAGE DRIVE) neo5064 Linux - Newbie 3 12-29-2003 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:57 AM.

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