LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2005, 05:29 AM   #1
Cogvos
Member
 
Registered: Feb 2005
Distribution: Suse 9.3 also Redhat 9, Umbuto, Mandriva 2005
Posts: 31

Rep: Reputation: 15
Problems installing linux onto a USB drive


Dear all,

I am having problems installing Linux onto an external usb/firewire hard drive. I wish to do this so that I can have a portable, writable linux distribution that I can plug into a number of pcs without having to install a boot loader onto that pc. In short I want to leave pcs untouched... but use linux on 'em.

Now 2 of my distributions install onto a usb disk

SUSE 9.3 and Fedora 4.

The external drive has 2 firewire sockets and 1 usb.

Q1. SUSE locks up at random points during the package copying when the drive is connected via firewire, but not if it's connected via usb. Windows does not have this problem, so I am guessing that it is not a cabling issue. Any ideas?

Q2. Once either SUSE or Fedora are installed I want to be able to boot from the USB hard drive. The PCs all have a boot menu (they are compaq's so pressing ESC brings this up) and I can select the usb drive. But... All that is displayed is the word GRUB in the top left corner. What do I have to do in order to get grub to load Linux? The boot loader is installed into the first sector of the USB drive and the drive order is usb then system drive.

Q3. I can boot SUSE by using the install DVD, waiting till I get to the part where it detects the install on the usb drive and then boot that. It takes a while but it works. One of the pcs has an Agere winmodem (ugh), SUSE 9.3 comes with a package called ltmodem, which I install, follow the directions on various web sites and totally fail to get the modem working. Can someone point me to an easy to follow way of doing this?

Hope someone can help. All the PCs identical compaq amd 3200+ systems, so there will not be a problem with kernal/module inconsitancies.

John.
 
Old 10-12-2005, 09:51 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
How did you install these distros to the usb drive?
Are the bioses set to boot from usb hdd?
 
Old 10-13-2005, 03:19 AM   #3
mjjzf
Member
 
Registered: Feb 2004
Location: Valby, Denmark / Citizen of the Web
Distribution: Slackware 14.1
Posts: 879

Rep: Reputation: 39
Boot floppy, perhaps?
 
Old 10-13-2005, 04:12 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Reading more carefully:
Q1. SUSE locks up at random points during the package copying when the drive is connected via firewire, but not if it's connected via usb. Windows does not have this problem, so I am guessing that it is not a cabling issue. Any ideas?


This sounds like you do not have SuSE installed to the external drive.
Are you saying you have already tried booting windows from the external drive?

This is interesting since it would appear you need have a boot image which can tell whether it is using firewire or usb. So - is this first question about installing or booting SuSE?

Q2. Once either SUSE or Fedora are installed I want to be able to boot from the USB hard drive. The PCs all have a boot menu (they are compaq's so pressing ESC brings this up) and I can select the usb drive. But... All that is displayed is the word GRUB in the top left corner. What do I have to do in order to get grub to load Linux? The boot loader is installed into the first sector of the USB drive and the drive order is usb then system drive.

"Once either SuSE or Fedora is installed..." suggests you do not have either installed. How are you attempting to install them?

In general:
Grub has to know where to find the boot image - look in /boot/grub/grub.conf and see where the /boot is expected to be.

The boot image needs to have the appropriate drivers.

You have to run grubinstall after the linux install

Installing linux to boot off a usb drive is fiddly depending on the distro. A lot depends on the installer and how you did the installation. Hence the question.

Q3. I can boot SUSE by using the install DVD, waiting till I get to the part where it detects the install on the usb drive and then boot that. It takes a while but it works. One of the pcs has an Agere winmodem (ugh), SUSE 9.3 comes with a package called ltmodem, which I install, follow the directions on various web sites and totally fail to get the modem working. Can someone point me to an easy to follow way of doing this?

There is no easy way to get a winmodem going. And they either go or they don't. Basically, this is quite a big question all by itself. You need to specify what exactly you did to get the modem going and in what way this has failed.

The most reliable way I have found to get a stubborn modem going is to run the scanModem script from the linmodem project and read what it says. It can be a bit dauntingly technical but it will give you sound advice in the middle there.

* * *

FWIW: here's a basic howto for installing FC3 so it boots off usb hdd:


1. Boot off of a rescue CD. If you use Redhat/Fedora, type

chroot /mnt/sysimage

If your rescue CD would not mount the partitions (for some reason, mine did not), you have to mount them manually and then change root to the hard disk's filesystem. In my case,

mount /dev/sda3 /mnt/sysimage
mount /dev/sda1 /mnt/sysimage/boot
chroot /mnt/sysimage

2. You'll need to create a custom initrd image. Fortunately, FC3 can do it for you

mkinitrd --preload=ehci-hcd --preload=usb-storage --preload=scsi_mod --preload=sd_mod /boot/usbinitrd.img 2.6.9-1.667smp

Warning: this did not work for me on FC3, probably because the sleep call (see below) was not there, and I was not
able to create a custom initrd using the steps below. But my hardware is pretty flaky. Other people reported success with this.

Stanislav Umansky made some corrections to the default mkinitrd script. He writes:

The mkinitrd command wasn't okay, because it lacked sleeps and some other commands, so we've changed it a little. The main thing is having sleeps and running sfdisk on /dev/sdb, /dev/sdc and /dev/sdd. When you boot on some systems with the primary SATA drive, /dev/sda is that SATA drive. Our USB drives become /dev/sdb, /dev/sdc...

As we installed FC3, it used volume labels to find a disk when booting (ROOT in our case), but when we tried to boot on a system where Linux had already been installed on the primary hard drive, the system found two ROOT-labeled partitions and didn't boot successfully, so we had to change the labels to ROOT_USB, etc and modify grub.conf.

3. Update your lilo.conf or grub.conf to use the new usbinitrd.gz with the same kernel that you grabbed the modules from. Run lilo or grub-install.

Author: Simon Ilyushchenko (simonf@simonf.com)

Last edited by Simon Bridge; 10-13-2005 at 04:16 AM.
 
Old 10-13-2005, 05:48 PM   #5
Cogvos
Member
 
Registered: Feb 2005
Distribution: Suse 9.3 also Redhat 9, Umbuto, Mandriva 2005
Posts: 31

Original Poster
Rep: Reputation: 15
Hello Simon,
Many thanks for such a detailed reply. To answer your questions in order...

Q1. Suse locks up during the install when the external drive is connected via firewire. Everything is ok up until the point where the install starts copying packages. Then at some random point during this something happens and the external drive 'disappears'. That's the best way to describe it. Eventually the copy times-out saying that it can't copy package xxxx. Retry fails, ignore fails on the next package, though without a timeout. Aborting the install and restarting the pc into windows does not make the drive come back. The only way to do so is power cycle both the pc and the external drive. At first I thought this was a heat problem, but Suse installs fine if the external drive is connected via USB and windows is quite happy accessing the drive via firewire. Note that I only have either the firewire or USB cables connected, never both.

Q2. Sort of answered above, basically by using install disks which I have (DVDs). Both Suse and Redhat install onto the external drive when its connected via USB. (Suse locks when its connected via Firewire and Fedora can't see the drive when its connected via Firewire).
I select expert partioning in both case. 3 partions Sda1 = boot, sda2 =/, sda 3= swap.
I have been switching the drive order and installing the bootloader onto the first sector of sda1...

However, I read that this might not work on a web site so tried to install it onto the MBR of the exteral drive. This now gives me a partially booting suse install and a Fedora 4 install that Kernal panics saying it can't sync. (I posted another question relating to the Suse boot on that forum. Appologies if this was wrong)

Q3. I had a feeling this would be the case. I got a winmodem working years ago on an old P1 200mhz PC using Redhat9, I had hoped that the ltmodem package on Suse would solve my problem without going through the hastle of scripts and stuff. Guess not. I'll have a look once I can get one of the dists to boot successfully from the external drive.

Many many many thanks for the mini howto. Just one question, when you say boot off a rescue cd, is this the install cd or another cd. If the latter how do I create it ? If the install cd where do I issue the chroot /mnt/sysimage command? At the start before the install (where you hit enter to start the install) or elsewhere. Sorry that was 3 questions.

Finally bios can boot from USB, cd or internal (windows), not sure about firewire, I have conflicting info on this.

John
 
Old 10-13-2005, 05:52 PM   #6
Cogvos
Member
 
Registered: Feb 2005
Distribution: Suse 9.3 also Redhat 9, Umbuto, Mandriva 2005
Posts: 31

Original Poster
Rep: Reputation: 15
Floppy boot disk?

Quote:
Originally posted by OSourceDiplomat
Boot floppy, perhaps?
Sorry OSourceDiplomat. The PC is a new PC, and does not have a floppy drive, 'cos people don't use them anymore'. The cynic in me reads this as 'we don't build pcs with floppy drives, thus forcing people to spend more money buying a floppy drive from us....

John.
 
Old 10-14-2005, 05:37 PM   #7
Cogvos
Member
 
Registered: Feb 2005
Distribution: Suse 9.3 also Redhat 9, Umbuto, Mandriva 2005
Posts: 31

Original Poster
Rep: Reputation: 15
USB booting linux --- Solved! ---

Many thanks to Simon, who put me on the right track with this. Taking his Mini howto as a starting point I created a new SUSE Initrd with the following command.

mkinitrd -m "ehci-hcd usb-storage scsi_mod sd_mod ohci-hcd uhci-hcd usbcore sata_sil atiixp reiserfs ext"

This overwrites the initrd in /boot so I made a copy of it. And lo- it works. I can now boot suse from an external USB hard drive. I guess the missing part was the usbcore, why it wasn't in the installed initrd is a mystery.

Also re win modem, I gave up the unequal struggle and bought a small adaptor that converts serial to usb, YaST now picks up my old US robotics external fax modem, I'm using it now.

Finally, there have been a few posts I've seen re getting nVidia cards to work, the newer ones like the 6600 GT. Well the latest 7676 divers work for me, but... I could not get YoU (or whatever its called) to install this properly. I had to download the drivers from the Nvidia wb site, kill X (init 3 from a root xterm), then run the Nvidia script (also as root) and finally start SaX2 to enable. I also had to install the kernal headers for the script to work.

I hope this helps anyone else with similar problems. The usual 'try it at your own risk' words apply. The above worked for me. I cannot guarentee it will work for you, nor can I guarentee that it won't damage anything,

John.
 
Old 12-14-2005, 10:29 PM   #8
waytoocrazy
LQ Newbie
 
Registered: Dec 2005
Posts: 1

Rep: Reputation: 0
Excellent, I now have hope to get Suse10 working off of my 80gb USB External drive. What I would like to do is dual partition the drive... 60gb for Windows (for backup) and 20gb for linux to learn the OS. I tried doing a custom partition setup, but got stuck (I'm clueless on how to use the custom partition info). If anyone can point me to the original post that has the walk through on how to actually install and then do the mkinit or whatever to actually get the drive to boot. I would also like to put the drive on any machine and have it work without putting lilo or grub on my internal HD.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Linux on a USB Flash Drive spaaarky21 Linux - Distributions 3 11-02-2004 02:17 PM
Installing Linux on a Portable USB Drive Burgin Linux - General 5 04-04-2004 08:07 PM
problems with installing RH9 on external USB drive... mveerdon Linux - Software 1 08-29-2003 05:29 AM
Installing Linux from a usb flash drive? jck Linux - General 0 08-03-2003 04:35 PM
Installing Linux on a USB flash drive!? delphinus Linux - General 4 03-15-2003 06:32 PM


All times are GMT -5. The time now is 03:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration