Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

slackware on external HDD

111 views
Skip to first unread message

crzyjw

unread,
May 7, 2009, 11:54:59 PM5/7/09
to
I have taken an old laptop SCSI HD and made it a new 80G external usb
drive. Now I want to install slackware to this drive so that I can
take my linux anywhere (as long as the computer supports usb boot).
From what I have read online it should be as easy as boot with install
cd, locate correct drive, and install to that drive like normal
installation. I do this and I get kernel panics and a whole lot of
weird stuff that I am unfamiliar with. I know that this has to be
possible and a lot easier than what I am coming up with. My question
is, can anyone out there that has successfully completed this give me
a few pointers or maybe some direction.

Otako

unread,
May 8, 2009, 6:01:04 AM5/8/09
to
On 2009-05-08, crzyjw wrote:
> From what I have read online it should be as easy as boot with install
> cd, locate correct drive, and install to that drive like normal
> installation. I do this and I get kernel panics and a whole lot of
> weird stuff that I am unfamiliar with.

Post the kernel panic messages and lilo.conf file for
the ext usb drive. Also what is the root filesystem
on the ext usb disk? An ext usb drive configuration
should be similar to a usb pen drive install.

Kernel panic messages may mention not being able to
mount the usb root partition if scsi, ext3 or reiser
filesystem is not supported in kernel or initrd.

If the root filesystem is mounted and the kernel can
not change over to it (or locate it) it may indicate
the root= stanza in the image section of lilo.conf on
the usb drive is wrong or not yet configured.

Here is my usb pens lilo.conf.

image = /boot/vmlinuz-huge-2.6.27.7
initrd = /boot/initrd.gz
label=flash
root = /dev/sdc1
read-write
append="hda=noprobe hdb=noprobe hdc=noprobe hdd=noprobe"

You will need to chroot to the ext usb root partition and
run liloconfig from there.

example:
#mount /dev/sda1 /mnt/memory
#chroot /mnt/memory #change root to /dev/sda1
#liloconfig #fix /dev/sda lilo.conf

--
otako

Douglas Mayne

unread,
May 8, 2009, 12:16:05 PM5/8/09
to

Are you sure about your hardware? Not many laptops use SCSI hard drives. I
guess it's possible.

I see that Slackware 12.x series offers to create a bootable USB stick are
part of its setup. This sets up an initrd which includes a script,
init. It is very worthwhile to study that startup script. (It's
quite short and straight-forward). Begin by reading this help file:
man mkinitrd

Even if you are using the standard Slackware method to build an
initrd, some basic understanding is necessary. By going back to
fundamentals, you can setup a system which boots from any media and any
filesystem that is supported by your hardware and by the Linux kernel.

Analyze what things are necessary to boot.
0. Hardware capability to boot from some device*
1. Proper boot loader support**
2. Kernel image and initrd image with proper kernel modules***
3. Installed image on target root filesystem. ****

Some notes:
* If you can't boot from USB, you may still be able to boot from CD-R.

** I use the grub boot loader. Load your kernel, and you'll probably need
an initrd.

*** For usb, the following modules are necessary (IME),
ehci_hcd, ohci_hcd, uhci_hcd, usb_storage. Also, sleep for a few seconds
after loading this module. You'll also need a filesystem module; I use
the XFS filesystem. You can use Slackware's standard mkinitrd:
man mkinitrd

I have noticed that some people skip this step and always boot with the
"huge" kernel. AFAIK, it is preferred that a modular kernel be used
with an initrd. To each his own, but following this advice makes it easier
to adapt to new situations (i.e. root filesystem targets). If you are
really using a SCSI target, then you'll need the modules required for the
specific device. I know from making virtual machines on VMWare which use a
SCSI controller, requires several modules be loaded in the proper order.

**** I usually start with an expanded base image and "clone" it into place
with "dd". Use whatever install method you prefer.

--
Douglas Mayne

Joseph H. Rosevear

unread,
May 8, 2009, 3:57:25 PM5/8/09
to

I'm using an external hard drive right now. I find it convenient in
the manner you suggested. I sometimes take it with me and boot from
other computers.

I do it in much the same way that Douglas Mayne suggested in another
post to this thread. I use Grub and I boot from a CD-R. The CD-R has
a kernel, some modules, and an initrd that includes a custom made init
script (plus some libraries and executables).

This advice (mostly from Douglas) sounds good to me:

-Don't use the huge kernel.
-Learn how to make an initrd.
-Study the init script.
-Use Grub and boot from a CD-R.
-Give some thought to which modules you will need. Douglas' suggestion
sounds like a good start, although I use a few others too. Maybe ext3?

-Joe

0 new messages