[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Apr 2004 ]

Re: [edlug] lilo on an external USB drive



Taking firstly, the case of if you had moved the drive from one
controller to another - but still onboard IDE: Then, you would have
the first-stage loader load (assuming the BIOS could find it)
because the BIOS knows how to load it. The second stage is based on
code in the first stage, which is still looking for the drive at the
old location. You need to change LILO so it knows to load the second
stage from another location. There is an article at
www.linuxfromscratch.org that goes through it (The article is about
building a full system on a secondary disk in one machine, and then
moving it to another machine as the primary disk - a mass builder,
if you will.)

The second problem is that this drive is hanging off the USB bus.
The BIOS may be able to see it as an IDE drive (probably hde - the
USB case may be presenting an IDE drive controller to your system).
The case you just need to find out what drive it is pretending to
be. It is probably doing this, as it managed to find the first stage
loader in the first place.

If the BIOS is not seeing it, or you don't want to go that way, an
alternative is to have a boot disk or CD, which has USB in kernel,
and the root argument points to the external drive.

It would be very helpful to you to boot up off a CD, load up the USB
modules, and have a look at /proc/partitions, /proc/ide/* and
/proc/usb/*. If you use devfs, also look at /dev/usb and /dev/ide.

Hope that helps.

On Thu, Apr 15, 2004 at 03:26:55PM -0000, Nick Woolley wrote:
> X-Apparently-To: jsljsl99@xxx.xxx.xxx via 217.12.10.43; Thu, 15 Apr 2004 14:47:19 +0000
> From: "Nick Woolley" <nickwoolley@xxx.xxx.xxx>
> To: <edlug@xxx.xxx.xxx>
> Subject: [edlug] lilo on an external USB drive
> Date: Thu, 15 Apr 2004 15:26:55 -0000
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Mailer: Microsoft Outlook Express 6.00.2800.1409
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
> X-Spam-Level: 
> X-Spam-Status: hits=0 tests= version=2.63-local6
> X-Edinburgh-Scanned: at haymarket.ed.ac.uk
>     with MIMEDefang 2.33, Sophie 3.04rc1, Sophos Anti-Virus 3.79
> X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang)
> Precedence: bulk
> List-Post: <mailto:edlug@xxx.xxx.xxx>
> List-Unsubscribe: <mailto:edlug-request@xxx.xxx.xxx>
> List-Subscribe: <mailto:edlug-request@xxx.xxx.xxx>
> 
> 
> Hi,
> 
> I've an old laptop IDE drive in a USB case, with linux installed on it
> already (as it was when it was an internal drive).  I'd like to be able to
> use it as a bootable device, like a kind of oversized USB pen device or a
> writable Knoppix CD.  The machine I'm using it for currently has no hard
> drive installed (it's a test machine and is having a pre-imaged OS installed
> on it, but that may take a week or two to get sent back to me).
> 
> I have a Knoppix CD already, but would prefer something which can have a
> custom configuration and software installed.  I had thought the easy route
> would be to boot the old linux partition, but after several tries I can only
> manage to get the 'L' out of 'LILO' to appear on boot.  I know this means
> that the secondary boot loader isn't being found, but I'm not sure why that
> would be. I could soldier on and do some more RTFM'ing, but I wondered if
> someone here might know of a recipe which should work in this case.
> 
> Details follow, I don't want to waste *too* much time doing this, but
> suggestions would be gratefully recceived.
> 
> Thanks,
> 
> Nick
> 
> -----
> 
> Booting from the Knoppix cd:
> 
> > sudo su
> > fdisk -l /dev/sd?
> 
> Disk /dev/sda: 12.0 GB, 12072517632 bytes
> 240 heads, 63 sectors/track, 1559 cylinders
> Units = cylinders of 15120 * 512 = 7741440 bytes
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *           1         407     3076888+   b  W95 FAT32
> /dev/sda2             408        1559     8709120    5  Extended
> /dev/sda5             408         434      204088+  82  Linux swap
> /dev/sda6            1247        1559     2366248+   b  W95 FAT32
> /dev/sda7             435         840     3069328+  83  Linux
> /dev/sda8             841        1246     3069328+  83  Linux
> 
> Partition table entries are not in disk order
> 
> > mount /mnt/sda7
> > cat /mnt/sda7/etc/lilo.usb.conf
> 
> boot=/dev/sda
> map=/mnt/sda7/boot/map
> install=text
> backup=/dev/null
> lba32
> vga=normal
> default=usblinux
> keytable=/mnt/sda7/boot/uk.klt
> prompt
> nowarn
> timeout=100
> ignore-table
> image=/mnt/sda7/boot/vmlinuz
>         label=usblinux
>         root=/dev/sda7
>         append="devfs=mount"
>         read-only
> 
> > lilo -C /mnt/sda7/etc/lilo.usb.conf -v
> 
> LILO version 22.5.8, Copyright (C) 1992-1998 Werner Almesberger
> Development beyond version 21 Copyright (C) 1999-2003 John Coffman
> Released 10-Oct-2003, and compiled at 16:48:46 on Feb 13 2004
> Debian GNU/Linux
> 
> Reading boot sector from /dev/sda
> Using TEXT secondary loader
> Calling map_insert_data
> 
> Boot image: /mnt/sda7/boot/vmlinuz -> vmlinuz-2.4.19-16mdk
> Added usblinux *
> 
> Writing boot sector.
> 
> > reboot
> 
> 
> I've also tried adding the global config line:
> 
> disk=/dev/sda
>     bios=0x80
> 
> But this didn't change the behaviour. Removing the Knoppix cd, and leaving
> the USB drive's plug in, it starts to boot, but only the letter 'L' is
> displayed, which implies that the secondary boot loader isn't being found.
> I only use LILO when necessary and then usually to repair an IDE
> hard-drive's MBR, so I've not much experience with this kind of scenario -
> perhaps I'm missing something simple.
> 
> 
> 
> -
> ----------------------------------------------------------------------
> You can find the EdLUG mailing list FAQ list at:
> http://www.edlug.org.uk/list_faq.html

-- 
Jarrod Lowe
+44 7766 06 55 15
-
----------------------------------------------------------------------
You can find the EdLUG mailing list FAQ list at:
http://www.edlug.org.uk/list_faq.html



This archive is kept by wibble@morpheux.org.DONTSPAMME
homepage