More on installing Slackware on a USB stick - Slackware

This is a discussion on More on installing Slackware on a USB stick - Slackware ; Following advice given in this forum, I had a go at installing Slackware on a USB stick plugged into my PC. The problem is, when I boot the Slackware 12.1 installation DVD, it does not seem to detect the USB ...

+ Reply to Thread
Results 1 to 16 of 16

Thread: More on installing Slackware on a USB stick

  1. More on installing Slackware on a USB stick

    Following advice given in this forum, I had a go at installing
    Slackware on a USB stick plugged into my PC. The problem is, when I boot
    the Slackware 12.1 installation DVD, it does not seem to detect the USB
    stick at all. That is, I tried to fdisk a bunch of /dev/sd* devices, to no
    avail. Since the DVD does not seem to come with lsusb, I am a bit stumped.

    Now in this PC I have a Slackware 12.1 distribution that I
    installed on my IDE hard drive from that very same DVD. This installation
    detects the USB stick all right. Why doesn't the installation DVD detect
    the stick? I used the hugesmp.s kernel - do I have to use something else?


  2. Re: More on installing Slackware on a USB stick

    Harold Weissman wrote:
    > Following advice given in this forum, I had a go at installing
    > Slackware on a USB stick plugged into my PC. The problem is, when I boot
    > the Slackware 12.1 installation DVD, it does not seem to detect the USB
    > stick at all. That is, I tried to fdisk a bunch of /dev/sd* devices, to no
    > avail. Since the DVD does not seem to come with lsusb, I am a bit stumped.
    >
    > Now in this PC I have a Slackware 12.1 distribution that I
    > installed on my IDE hard drive from that very same DVD. This installation
    > detects the USB stick all right. Why doesn't the installation DVD detect
    > the stick? I used the hugesmp.s kernel - do I have to use something else?
    >


    I had the same issue when I installed Slackware 10.2 on a 1gb usb memory
    stick back in 2005. With kernel 2.4, I needed to manually create block
    device nodes in the /dev directory for the sda devices like /dev/sda,
    /dev/sda1 /dev/sda2 and so one based on the partitioning of the usb
    drive. Only after that could they be mounted manually.

    All update to that system have been in place so I'm not sure about the
    newer 2.6 kernel based Slackwares. However, to use my iPod as an install
    media for Slackware 12.1, I often needed to start the PC with the iPod
    connected to the usb port and then once at the command line I would run
    fdisk /dev/sda twice. The first attempt would fail but I believe it
    allows udev the chance to create the needed devices in the /sys
    filesystem. Then, the second call to fdisk /dev/sda would show the
    partition table. Once that works, I exit fdisk with making any changes
    and manually mount the needed partitions in a /tmp/ipod directory I
    created beforehand.

    Hope that fits in with the other instructions you are following.

    Chris


  3. Re: More on installing Slackware on a USB stick

    On Mon, 03 Nov 2008 22:26:39 +0000, Harold Weissman wrote:

    > Following advice given in this forum, I had a go at installing
    > Slackware on a USB stick plugged into my PC. The problem is, when I boot
    > the Slackware 12.1 installation DVD, it does not seem to detect the USB
    > stick at all. That is, I tried to fdisk a bunch of /dev/sd* devices, to no
    > avail. Since the DVD does not seem to come with lsusb, I am a bit stumped.
    >
    > Now in this PC I have a Slackware 12.1 distribution that I
    > installed on my IDE hard drive from that very same DVD. This installation
    > detects the USB stick all right. Why doesn't the installation DVD detect
    > the stick? I used the hugesmp.s kernel - do I have to use something else?
    >

    This may not be addressing your problem directly, but going back to
    fundamentals never hurts, IMO. There are a couple of variations possible
    here. For example, you could want to have just your kernel and initrd on
    USB, with your root filesystem on SATA or IDE. This is a simple case
    where you only are replacing a boot floppy or boot CD with a bootable USB
    media. Another possibility, it that you may want to have both your
    kernel/initrd and root filesystem on USB. This is possible, and may be
    desirable to have a portable system- say, installed on a portable USB 2.0
    hard disk.

    Fundamentally, to boot any GNU/Linux you need at least these things:
    0. Hardware capability to boot from intended target.
    1. Bootloader. I use the grub loader.
    2. kernel and initrd.
    The initrd must include an appropriate init script.
    The initrd must include kernel modules as necessary to boot.
    3. Root filesystem on target device.

    Study the "readme" for creating an initrd appropriate for Slackware, as it
    is the most critical element- assuming that you have hardware
    compatibility to boot from USB.

    The most likely modules that you will need for your initrd are as follows:
    ehci_hcd
    ohci_hcd
    uhci_hcd
    usb_storage -> (then wait for USB bus to report drives, check the init
    script)

    You will also need the modules for the filesystem you are using. I use xfs:
    xfs

    Other USB controller chips may require different kernel modules. The above
    has worked for the subset of hardware that I use. I also read recently on
    the Linux kernel mailing list that ehci_hcd must be loaded first. The
    mnemonic device that I have found is to load in alphabetical order (at
    least for the above list )

    IMO, this is a very good test exercise. If nothing else, it will give you
    a good understanding of the boot process including the bootloader,
    kernel, kernel modules, and root filesystem. I like to be able to "do it
    for myself." I have written in this newsgroup on this topic before. The
    whole concept is much more straight forward with the current version of
    Slackware because _all_ setups require an initrd, not just special cases.
    That means if you can setup standard Slackware, you are most of the way to
    setting up special cases, etc.

    --
    Douglas Mayne


  4. Re: More on installing Slackware on a USB stick

    On Tue, 04 Nov 2008 09:36:50 -0700, Douglas Mayne wrote:

    On Tue, 04 Nov 2008 09:36:50 -0700, Douglas Mayne wrote:

    > On Mon, 03 Nov 2008 22:26:39 +0000, Harold Weissman wrote:
    >
    >> Following advice given in this forum, I had a go at installing
    >> Slackware on a USB stick plugged into my PC. The problem is, when I
    >> boot the Slackware 12.1 installation DVD, it does not seem to detect
    >> the USB stick at all. That is, I tried to fdisk a bunch of /dev/sd*
    >> devices, to no avail. Since the DVD does not seem to come with lsusb, I
    >> am a bit stumped.
    >>
    >> Now in this PC I have a Slackware 12.1 distribution that I
    >> installed on my IDE hard drive from that very same DVD. This
    >> installation detects the USB stick all right. Why doesn't the
    >> installation DVD detect the stick? I used the hugesmp.s kernel - do I
    >> have to use something else?
    >>

    > This may not be addressing your problem directly, but going back to
    > fundamentals never hurts, IMO. There are a couple of variations possible
    > here. For example, you could want to have just your kernel and initrd on
    > USB, with your root filesystem on SATA or IDE. This is a simple case
    > where you only are replacing a boot floppy or boot CD with a bootable
    > USB media. Another possibility, it that you may want to have both your
    > kernel/initrd and root filesystem on USB. This is possible, and may be
    > desirable to have a portable system- say, installed on a portable USB
    > 2.0 hard disk.
    >
    > Fundamentally, to boot any GNU/Linux you need at least these things: 0.
    > Hardware capability to boot from intended target. 1. Bootloader. I use
    > the grub loader. 2. kernel and initrd.
    > The initrd must include an appropriate init script. The initrd

    must
    > include kernel modules as necessary to boot.
    > 3. Root filesystem on target device.
    >
    > Study the "readme" for creating an initrd appropriate for Slackware, as
    > it is the most critical element- assuming that you have hardware
    > compatibility to boot from USB.
    >
    > The most likely modules that you will need for your initrd are as
    > follows: ehci_hcd
    > ohci_hcd
    > uhci_hcd
    > usb_storage -> (then wait for USB bus to report drives, check the init
    > script)


    Thanks for your very useful feedback. I am confused though about
    the need to have all those objects compiled as modules. Would it not be
    better just to statically compile them into the kernel image? Wouldn't
    this do away with the need to have the initrd? Everybody says that an
    initrd must be used for this purpose, but it is not at all clear to me
    why.

    > You will also need the modules for the filesystem you are using. I use
    > xfs: xfs
    >
    > Other USB controller chips may require different kernel modules. The
    > above has worked for the subset of hardware that I use. I also read
    > recently on the Linux kernel mailing list that ehci_hcd must be loaded
    > first. The mnemonic device that I have found is to load in alphabetical
    > order (at least for the above list )
    >
    > IMO, this is a very good test exercise. If nothing else, it will give
    > you a good understanding of the boot process including the bootloader,
    > kernel, kernel modules, and root filesystem. I like to be able to "do it
    > for myself." I have written in this newsgroup on this topic before. The
    > whole concept is much more straight forward with the current version of
    > Slackware because _all_ setups require an initrd, not just special
    > cases. That means if you can setup standard Slackware, you are most of
    > the way to setting up special cases, etc.



  5. Re: More on installing Slackware on a USB stick

    Harold Weissman wrote:
    >
    > Thanks for your very useful feedback. I am confused though about
    > the need to have all those objects compiled as modules. Would it not be
    > better just to statically compile them into the kernel image? Wouldn't
    > this do away with the need to have the initrd? Everybody says that an
    > initrd must be used for this purpose, but it is not at all clear to me
    > why.
    >


    Your are right, with the HUGE kernel, the default one for Slackware 12.1
    installer has everything in it so an initrd is not needed for hardware
    support. The initrd used by the installer is actually a temp root
    filesystem with the setup script needed to guide you through the
    Slackware installation.

    Here is what you need to do to get the installer to "see" your usb drive.

    Boot from Slackware 12.1 install CD or DVD with the usb drive connected
    to the PC.

    At the "Boot:" prompt, simply hit enter. This will load the defualt huge
    kernel image.

    At the "Keyboard:" prompt, do what you have to do. I simple hit enter
    for my US layout.

    At the login prompt, type in "root" and hit enter.

    Now, I come back to my double fdisk trick.
    First, type "dmesg" at the commmand prompt. You should be your USB drive
    listed at the end of the output. Not the location of the drive. It is
    /dev/sda in my case.

    At the command prompt again, make the call to fdisk with the correct device.

    # fdisk /dev/sda

    This will return a message of "Unable to open /dev/sda".
    Repeat the command a second time.

    # fdisk /dev/sda

    This time you will enter into the fdisk menu. Enter p to see the
    partition table. Now, make the needed changes and exit fdisk with q or w
    as needed.

    Back at the command prompt, you can now enter setup.

    # setup

    Once in the Setup program, you can select your /dev/sda1 partition as
    the target partition.

    Best of luck.
    Chris

  6. Re: More on installing Slackware on a USB stick

    On Tue, 04 Nov 2008 09:36:50 -0700, Douglas Mayne wrote:
    ....
    >IMO, this is a very good test exercise. If nothing else, it will give you
    >a good understanding of the boot process including the bootloader,
    >kernel, kernel modules, and root filesystem. I like to be able to "do it
    >for myself." I have written in this newsgroup on this topic before. The
    >whole concept is much more straight forward with the current version of
    >Slackware because _all_ setups require an initrd, not just special cases.

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    What? I've yet to run an initrd, why must I and what will I gain over using
    a kernel compiled to suit the particular hardware? I'm curious because one
    day soon I'll be updating my own kernel build scripts to say goodbye to 2.4
    series and I's like to support initrd -- which is difficult when I don't see
    the need for an initrd.

    Long time since I had the motivation to run slack from USB. The other trick
    I was looking at while back was an old IBM 365X with /usr on CompactFlash
    That stalled because I'd have to go back to slack-8.1 (I think) to get older
    X support -- easier to leave the poor thing on Win98, but I've not turned on
    that lappy for months.

    >That means if you can setup standard Slackware, you are most of the way to
    >setting up special cases, etc.


    Hmm, except I haven't had the 'penny drop' for initrd over custom kernel, and
    I've been using linux for over ten years -- slackware since v9.0.

    Grant.
    --
    http://bugsplatter.id.au

  7. Re: More on installing Slackware on a USB stick

    On Tue, 04 Nov 2008 14:36:36 -0700, Christopher D. Kyle wrote:

    On Tue, 04 Nov 2008 14:36:36 -0700, Christopher D. Kyle wrote:

    > Harold Weissman wrote:
    >>
    >> Thanks for your very useful feedback. I am confused though about
    >> the need to have all those objects compiled as modules. Would it not be
    >> better just to statically compile them into the kernel image? Wouldn't
    >> this do away with the need to have the initrd? Everybody says that an
    >> initrd must be used for this purpose, but it is not at all clear to me
    >> why.
    >>
    >>

    > Your are right, with the HUGE kernel, the default one for Slackware 12.1
    > installer has everything in it so an initrd is not needed for hardware
    > support. The initrd used by the installer is actually a temp root
    > filesystem with the setup script needed to guide you through the
    > Slackware installation.
    >
    > Here is what you need to do to get the installer to "see" your usb
    > drive.
    >
    > Boot from Slackware 12.1 install CD or DVD with the usb drive connected
    > to the PC.
    >
    > At the "Boot:" prompt, simply hit enter. This will load the defualt huge
    > kernel image.
    >
    > At the "Keyboard:" prompt, do what you have to do. I simple hit enter
    > for my US layout.
    >
    > At the login prompt, type in "root" and hit enter.
    >
    > Now, I come back to my double fdisk trick. First, type "dmesg" at the
    > commmand prompt. You should be your USB drive listed at the end of the
    > output. Not the location of the drive. It is /dev/sda in my case.
    >
    > At the command prompt again, make the call to fdisk with the correct
    > device.
    >
    > # fdisk /dev/sda
    >
    > This will return a message of "Unable to open /dev/sda". Repeat the
    > command a second time.
    >
    > # fdisk /dev/sda
    >
    > This time you will enter into the fdisk menu. Enter p to see the
    > partition table. Now, make the needed changes and exit fdisk with q or w
    > as needed.
    >
    > Back at the command prompt, you can now enter setup.
    >
    > # setup
    >
    > Once in the Setup program, you can select your /dev/sda1 partition as
    > the target partition.


    Some progress, but not there yet. Let me first describe my setup:

    I have a Linux box running Slackware 12.0, which is installed in
    /dev/hda. I used this to install Slackware 12.1 on a USB stick, as above.
    This stick gets mounted on the 12.0 OS under /media/disk. I therefore did

    cd /media/disk/etc

    and created lilo.conf with the following contents:

    # LILO configuration file
    #
    # Start LILO global section
    # Append any additional kernel parameters: append=" vt.default_utf8=0"
    boot = /dev/sda

    # Boot BMP Image.
    bitmap = /media/disk/boot/slack.bmp
    # Menu colors (foreground, background, shadow, highlighted # foreground,
    highlighted background, highlighted shadow):
    bmp-colors = 255,0,255,0,255,0
    # Location of the option table: location x, location y, number of #
    columns, lines per column (max 15), "spill" (this is how many # entries
    must be in the first column before the next begins to # be used. We don't
    specify it here, as there's just one column.
    bmp-table = 60,6,1,16
    # Timer location x, timer location y, foreground color, # background
    color, shadow color.
    bmp-timer = 65,27,0,255

    # Wait until the timeout to boot (if commented out, boot the # first entry
    immediately):
    prompt
    # Timeout before the first entry boots. # This is given in tenths of a
    second, so 600 for every minute: timeout = 120
    # Override dangerous defaults that rewrite the partition table:
    change-rules
    reset
    # Normal VGA console
    vga = normal
    # End LILO global section
    # Linux bootable partition config begins image = /media/disk/boot/vmlinuz
    initrd = /media/disk/boot/initrd.gz
    root = /dev/sda1
    label = S121
    read-only
    # Linux bootable partition config ends

    I had to create an initrd, because the kernel does not have the
    *_hcd objects compiled in.

    With the stuff above, I installed LILO on the USB with

    lilo -C /media/disk/etc/lilo.conf

    After doing all this, I am indeed able to boot off the USB stick
    all right. The problem is, when booting this what gets used as the root
    disk is /dev/hda, instead of /dev/sda. Why? The lilo.conf file above
    clearly specifies that the root partition should be /dev/sda1.

    Where is this kernel (which is, without any doubt whatsoever, the
    one in the USB stick) getting the info that tells it that the root disk is
    /dev/hda, rather than /dev/sda? The Slackware 12.1 installation in the USB
    stick contain no references to /dev/hda that I know of. In fact, the
    /etc/fstab file here reads

    /dev/sda2 swap swap defaults 0 0
    /dev/sda1 / ext3 defaults 1 1
    #/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
    /dev/fd0 /mnt/floppy auto noauto,owner 0 0
    devpts /dev/pts devpts gid=5,mode=620 0 0 proc
    /proc proc defaults 0 0 tmpfs
    /dev/shm tmpfs defaults 0 0

    It is totally ignored though, together with (apparently)
    everything else in /dev/sda. Any suggestions?


  8. Re: More on installing Slackware on a USB stick

    On Wed, 05 Nov 2008 09:15:16 +1100, Grant wrote:

    > On Tue, 04 Nov 2008 09:36:50 -0700, Douglas Mayne wrote:
    > ...
    >>IMO, this is a very good test exercise. If nothing else, it will give you
    >>a good understanding of the boot process including the bootloader,
    >>kernel, kernel modules, and root filesystem. I like to be able to "do it
    >>for myself." I have written in this newsgroup on this topic before. The
    >>whole concept is much more straight forward with the current version of
    >>Slackware because _all_ setups require an initrd, not just special cases.

    > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    >
    > What? I've yet to run an initrd, why must I and what will I gain over using
    > a kernel compiled to suit the particular hardware? I'm curious because one
    > day soon I'll be updating my own kernel build scripts to say goodbye to 2.4
    > series and I's like to support initrd -- which is difficult when I don't see
    > the need for an initrd.
    >

    If you provide your own kernel, then you can do what you want. AFAIK, the
    recommended standard kernels (as included with the distribution) require
    an initrd. The standard kernel has support for common IDE and SATA
    controllers, but no filesystems beyond RAMFS, TMPFS. So, you will need a
    module even for ext2, now. Hence, the requirement to have an initrd. I
    don't know the relative merits of not using the "huge" kernel with
    everything mostly included, rather than as a module. It does seems
    intuitive that if you don't need specific hardware, then you can save time
    and memory by not loading a driver for it. I use the standard kernel, or
    one which is a very close derivative.

    BTW, I read in the Changelog for -current that even old kernels in the
    2.6.x series are not supported (due to glibc compatibility).

    >
    > Long time since I had the motivation to run slack from USB. The other
    > trick I was looking at while back was an old IBM 365X with /usr on
    > CompactFlash That stalled because I'd have to go back to slack-8.1 (I
    > think) to get older X support -- easier to leave the poor thing on
    > Win98, but I've not turned on that lappy for months.
    >
    >>That means if you can setup standard Slackware, you are most of the way
    >>to setting up special cases, etc.

    >
    > Hmm, except I haven't had the 'penny drop' for initrd over custom
    > kernel, and I've been using linux for over ten years -- slackware since
    > v9.0.
    >

    Coincidentally, I also joined Slackware at 9.0!
    >
    > Grant.
    >

    Here is the specific note that I take as "advice" or as a recommendation
    from the file .../slackware/slackware-12.1/CHANGES_AND_HINTS.TXT


    As stated earlier, it is recommended that you use one of the generic
    kernels rather than the huge kernels; the huge kernels are primarily
    intended as "installer" and "emergency" kernels in case you forget to make
    an initrd. For most systems, you should use the generic SMP kernel if it
    will run, even if your system is not SMP-capable. Some newer hardware
    needs the local APIC enabled in the SMP kernel, and theoretically there
    should not be a performance penalty with using the SMP-capable kernel on
    a uniprocessor machine, as the SMP kernel tests for this and makes
    necessary adjustments. Furthermore, the kernel sources shipped with
    Slackware are configured for SMP usage, so you won't have to modify those
    to build external modules (such as NVidia or ATI proprietary drivers) if
    you use the SMP kernel.


    --
    Douglas Mayne

  9. Re: More on installing Slackware on a USB stick

    Harold Weissman wrote:
    > On Tue, 04 Nov 2008 14:36:36 -0700, Christopher D. Kyle wrote:
    >
    > On Tue, 04 Nov 2008 14:36:36 -0700, Christopher D. Kyle wrote:
    >
    >> Harold Weissman wrote:
    >>> Thanks for your very useful feedback. I am confused though about
    >>> the need to have all those objects compiled as modules. Would it not be
    >>> better just to statically compile them into the kernel image? Wouldn't
    >>> this do away with the need to have the initrd? Everybody says that an
    >>> initrd must be used for this purpose, but it is not at all clear to me
    >>> why.
    >>>
    >>>

    >> Your are right, with the HUGE kernel, the default one for Slackware 12.1
    >> installer has everything in it so an initrd is not needed for hardware
    >> support. The initrd used by the installer is actually a temp root
    >> filesystem with the setup script needed to guide you through the
    >> Slackware installation.
    >>
    >> Here is what you need to do to get the installer to "see" your usb
    >> drive.
    >>
    >> Boot from Slackware 12.1 install CD or DVD with the usb drive connected
    >> to the PC.
    >>
    >> At the "Boot:" prompt, simply hit enter. This will load the defualt huge
    >> kernel image.
    >>
    >> At the "Keyboard:" prompt, do what you have to do. I simple hit enter
    >> for my US layout.
    >>
    >> At the login prompt, type in "root" and hit enter.
    >>
    >> Now, I come back to my double fdisk trick. First, type "dmesg" at the
    >> commmand prompt. You should be your USB drive listed at the end of the
    >> output. Not the location of the drive. It is /dev/sda in my case.
    >>
    >> At the command prompt again, make the call to fdisk with the correct
    >> device.
    >>
    >> # fdisk /dev/sda
    >>
    >> This will return a message of "Unable to open /dev/sda". Repeat the
    >> command a second time.
    >>
    >> # fdisk /dev/sda
    >>
    >> This time you will enter into the fdisk menu. Enter p to see the
    >> partition table. Now, make the needed changes and exit fdisk with q or w
    >> as needed.
    >>
    >> Back at the command prompt, you can now enter setup.
    >>
    >> # setup
    >>
    >> Once in the Setup program, you can select your /dev/sda1 partition as
    >> the target partition.

    >
    > Some progress, but not there yet. Let me first describe my setup:
    >
    > I have a Linux box running Slackware 12.0, which is installed in
    > /dev/hda. I used this to install Slackware 12.1 on a USB stick, as above.
    > This stick gets mounted on the 12.0 OS under /media/disk. I therefore did
    >
    > cd /media/disk/etc
    >
    > and created lilo.conf with the following contents:
    >
    > # LILO configuration file
    > #
    > # Start LILO global section
    > # Append any additional kernel parameters: append=" vt.default_utf8=0"
    > boot = /dev/sda
    >
    > # Boot BMP Image.
    > bitmap = /media/disk/boot/slack.bmp
    > # Menu colors (foreground, background, shadow, highlighted # foreground,
    > highlighted background, highlighted shadow):
    > bmp-colors = 255,0,255,0,255,0
    > # Location of the option table: location x, location y, number of #
    > columns, lines per column (max 15), "spill" (this is how many # entries
    > must be in the first column before the next begins to # be used. We don't
    > specify it here, as there's just one column.
    > bmp-table = 60,6,1,16
    > # Timer location x, timer location y, foreground color, # background
    > color, shadow color.
    > bmp-timer = 65,27,0,255
    >
    > # Wait until the timeout to boot (if commented out, boot the # first entry
    > immediately):
    > prompt
    > # Timeout before the first entry boots. # This is given in tenths of a
    > second, so 600 for every minute: timeout = 120
    > # Override dangerous defaults that rewrite the partition table:
    > change-rules
    > reset
    > # Normal VGA console
    > vga = normal
    > # End LILO global section
    > # Linux bootable partition config begins image = /media/disk/boot/vmlinuz
    > initrd = /media/disk/boot/initrd.gz
    > root = /dev/sda1
    > label = S121
    > read-only
    > # Linux bootable partition config ends
    >
    > I had to create an initrd, because the kernel does not have the
    > *_hcd objects compiled in.
    >
    > With the stuff above, I installed LILO on the USB with
    >
    > lilo -C /media/disk/etc/lilo.conf
    >
    > After doing all this, I am indeed able to boot off the USB stick
    > all right. The problem is, when booting this what gets used as the root
    > disk is /dev/hda, instead of /dev/sda. Why? The lilo.conf file above
    > clearly specifies that the root partition should be /dev/sda1.
    >
    > Where is this kernel (which is, without any doubt whatsoever, the
    > one in the USB stick) getting the info that tells it that the root disk is
    > /dev/hda, rather than /dev/sda? The Slackware 12.1 installation in the USB
    > stick contain no references to /dev/hda that I know of. In fact, the
    > /etc/fstab file here reads
    >
    > /dev/sda2 swap swap defaults 0 0
    > /dev/sda1 / ext3 defaults 1 1
    > #/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
    > /dev/fd0 /mnt/floppy auto noauto,owner 0 0
    > devpts /dev/pts devpts gid=5,mode=620 0 0 proc
    > /proc proc defaults 0 0 tmpfs
    > /dev/shm tmpfs defaults 0 0
    >
    > It is totally ignored though, together with (apparently)
    > everything else in /dev/sda. Any suggestions?
    >



    A few things stand out.

    One issue is that you are running lilo from a system (12.0) that uses
    /dev/hda for its root filesystem. If you made your initrd there, it may
    reference /dev/hda and not /dev/sda as you need. One solution would be
    to chroot to the usb drive (/media/disk/) and then setup etc/lilo.conf
    and make an initrd file in the new environment.

    Another issue is the /media/disk/boot/vmlinuz does not exist once you
    reboot off of the usb drive as /dev/sda IS the root /

    If it were me, I would continue to do the setting up with the
    installation media, Slackware 12.1 CD or DVD. This avoids all the chroot
    requirements and issue of cross pollinating setting from one system to
    the other.

    So let's get started. Boot the PC from the Slackware 12.1 CD or DVD with
    the usb drive connected. This time, at the boot prompt, enter the
    following.

    hugesmp.s root=/dev/sda1 rdinit= ro

    That should use the usb drive as the root filesystem and skip the
    Slackware installer initrd. Once logged onto the system as root, update
    /etc/lilo.conf and return lilo. You should even be able to run the
    liloconf script and get a fresh lilo.conf file.

    Once again, good luck.
    Chris


  10. Re: More on installing Slackware on a USB stick

    WOO-HOO! I got it to work, at last! I will presently post an
    account, in case it will be of help to someone in the same circumstances.


  11. Re: More on installing Slackware on a USB stick

    OK, this is what worked for me.

    First, I have a Slackware 12.0 box A up and running already, with
    Slackware installed on /dev/hda1. I did everything on A.

    I booted A off the Slackware 12.1 installation DVD. After this is
    completed I inserted the USB stick U in which I wanted to install
    Slackware 12.1. This event was detected (and assigned /dev/sda) and I
    proceeded to install 12.1 on U (by first partioning it with fdisk, as
    usual) making sure to install the hugesmp.s kernel on U. This kernel image
    seems to have everything to do with USB compiled in, so that one doesn't
    have to create an initrd.

    I would have liked to do all that just by using the 12.1 DVD from
    my running 12.0 environment, but I couldn't figure it out.

    When the installation process finished I was asked to install
    LILO. I just skipped that - I installed LILO by hand later on, as I will
    explain.

    With 12.1 already in U, I booted A as Slackware 12.0, as usual. I
    then mounted U under /media/disk, and changed /media/disk/etc/lilo.conf to
    have the following contents:

    # Start LILO global section
    # Append any additional kernel parameters: append="rootdelay=10
    vt.default_utf8=0" boot = /dev/sda

    # Boot BMP Image.
    # Bitmap in BMP format: 640x480x8
    bitmap = /media/disk/boot/slack.bmp
    # Menu colors (foreground, background, shadow, highlighted # foreground,
    highlighted background, highlighted shadow):
    bmp-colors = 255,0,255,0,255,0
    # Location of the option table: location x, location y, number of #
    columns, lines per column (max 15), "spill" (this is how many # entries
    must be in the first column before the next begins to # be used. We don't
    specify it here, as there's just one column.
    bmp-table = 60,6,1,16
    # Timer location x, timer location y, foreground color, # background
    color, shadow color.
    bmp-timer = 65,27,0,255

    # Standard menu.
    # Wait until the timeout to boot (if commented out, boot the # first entry
    immediately):
    prompt
    # Timeout before the first entry boots. # This is given in tenths of a
    second, so 600 for every minute: timeout = 120
    # Override dangerous defaults that rewrite the partition table:
    change-rules
    reset
    # Normal VGA console
    vga = normal
    # End LILO global section
    # Linux bootable partition config begins image = /media/disk/boot/vmlinuz
    root = /dev/sda1
    label = S121
    read-only
    # Linux bootable partition config ends

    One line that is critical to all this is the one containing
    rootdelay=10 - without this, the boot process predictably won't succeed. I
    am a bit bitter about this - I have seen many recipes that claim to
    explain how to boot off USB devices, and most of them don't even mention
    it. It took me ages to find out about this, although once you know about
    it you can find lots of Google hits where its relevance is explained.

    Anyway, with this in place, as root I did

    cd /media/disk/etc/
    lilo -C ./lilo.conf

    This printed out some warnings, but seemed to install LILO all right.

    I then rebooted A (making sure that the BIOS was set to boot of
    USB first) and at I last had Slackware 12.1 running on A, booted from U,
    and with the root filesystem on U as well.

    After this I rebooted A, this time trying to boot 12.0 off /dev/
    hda, as usual. This wouldn't work - LILO was foobarred (a long string of
    09 pairs, I think, was printed out, and that was it). I therefore had to
    reinstall LILO correctly for 12.0 (by booting off the 12.1 DVD and making
    sure that /dev/hda1 got installed as the root filesystem, and invoking
    lilo then) and I can now boot off my hard drive (Slackware 12.0) or USB
    stick (Slackware 12.1) without any prolems.

    I am not claiming that this the best way to do it. It probably
    isn't but, unlike the recipes I came across in the net, it worked for me -
    maybe it will for others too. In truth, I found most of those recipes
    confusing and vague in some critical aspects. Maybe that's just me.

    Many thanks to Mr. Kyle for his most useful feedback on this
    subject.


  12. Re: More on installing Slackware on a USB stick

    Harold Weissman wrote:

    > One line that is critical to all this is the one containing
    > rootdelay=10 - without this, the boot process predictably won't succeed. I
    > am a bit bitter about this - I have seen many recipes that claim to
    > explain how to boot off USB devices, and most of them don't even mention
    > it. It took me ages to find out about this, although once you know about
    > it you can find lots of Google hits where its relevance is explained.
    >


    Thanks for the rootdelay tip. I used to manually put a 10 second sleep
    in my initrd image in order to give the usb drive time to initialize.
    Now things should be so much more simple.

    See, by helping others, I've learned something new myself.

    >
    > Many thanks to Mr. Kyle for his most useful feedback on this
    > subject.
    >


    You're welcome. Glad some of my stuff helped.

  13. Re: More on installing Slackware on a USB stick

    On Wed, 05 Nov 2008 10:26:49 -0700, Christopher D. Kyle wrote:

    > See, by helping others, I've learned something new myself.




  14. Re: More on installing Slackware on a USB stick

    Harold Weissman wrote:

    > Following advice given in this forum, I had a go at installing
    > Slackware on a USB stick plugged into my PC. The problem is, when I boot
    > the Slackware 12.1 installation DVD, it does not seem to detect the USB
    > stick at all. That is, I tried to fdisk a bunch of /dev/sd* devices, to no
    > avail. Since the DVD does not seem to come with lsusb, I am a bit stumped.


    You could try Slax?


    --
    http://www.petezilla.co.uk

  15. Re: More on installing Slackware on a USB stick

    Harold Weissman wrote:
    >> The most likely modules that you will need for your initrd are as
    >> follows: ehci_hcd
    >> ohci_hcd
    >> uhci_hcd
    >> usb_storage -> (then wait for USB bus to report drives, check the init
    >> script)

    >
    > Thanks for your very useful feedback. I am confused though about
    > the need to have all those objects compiled as modules. Would it not be
    > better just to statically compile them into the kernel image? Wouldn't


    uhci_hcd and ohci_hcd are mutual INcompatible, you either load the one
    (with certain USB controllers) _or_ the other (with different ones).
    So which one would you put into the kernel image?
    As soon as you build a kernel with the former, that kernel will never
    work with hardware that needs the latter, because you cannot UNload
    a built-in driver.
    Auto-loading, either from a ramdisk (if you're booting FROM an
    USB-drive) or afterwards from the harddisk works fine as now the auto-
    detect in udev/hotplug will detect AND load the correct one.

    Other usb modules, like usb_storage cannot be loaded until the right
    hardware driver has been loaded first.

    You will also see that your USB keyboard and/or mouse will not work
    early in the boot cycle, because of the same reasons.

    Of course, for a SPECIFIC PC you can built-in the right USB drivers
    into your own (custom) kernel.
    --
    ************************************************** *****************
    ** Eef Hartman, Delft University of Technology, dept. SSC/ICT **
    ** e-mail: E.J.M.Hartman@tudelft.nl, fax: +31-15-278 7295 **
    ** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
    ************************************************** *****************

  16. Re: More on installing Slackware on a USB stick

    Eef Hartman wrote:
    > Harold Weissman wrote:
    >>> The most likely modules that you will need for your initrd are as
    >>> follows: ehci_hcd
    >>> ohci_hcd
    >>> uhci_hcd
    >>> usb_storage -> (then wait for USB bus to report drives, check the init
    >>> script)

    >>
    >> Thanks for your very useful feedback. I am confused though about
    >> the need to have all those objects compiled as modules. Would it not be
    >> better just to statically compile them into the kernel image? Wouldn't

    >
    > uhci_hcd and ohci_hcd are mutual INcompatible, you either load the one
    > (with certain USB controllers) _or_ the other (with different ones).


    Oh?
    ~$ lsmod |grep hcd
    ehci_hcd 30732 0
    ohci_hcd 21520 0
    uhci_hcd 20620 0

    I seem to have both uhci & ohci modules loaded, and I assure you that
    USB is working. They will only attach to the hardware that _requires_
    them.

    Jerry

+ Reply to Thread