LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-03-2011, 08:40 AM   #1
sdrkyj
LQ Newbie
 
Registered: Jan 2011
Posts: 13

Rep: Reputation: 1
Question How could I get the Slackware Linux distro on my external HDD booted up from my noteb


I'm using a notebook bought in 2006, the configuration is 60GB HDD, 940gml chip, 2GB memory, 1.6GHz Celeron-D CPU. I bought a USB2.0 3.5inch 1TB "Seagate Expansion External Drive". The file system of the only partition on it is NTFS. I installed Grub MBR on the external HDD using grubinst then copy the grldr, grub.exe and menu.lst to it, added Slax to the only partition, then I could get Slax booting up. However, the external HDD could only get booting up when my notebook is first power on; if I reboot it, the external HDD would auto turn off and on when sef-checking and cannot be shown in the Esc boot menu.

I tried to install Slackware 13.1 to the external HDD successfully but failed to boot. I used WinPM to resize the primary partition to make about 60GB space at the end of the disk for Linux distro; booted the Slackware USB image from Grub4DOS, and ran cfdisk to make patitions from the 60GB space for Linux, ran setup to install Slackware. Then at the step of the lilo bootloader configure, if I select to install the lilo in MBR, it would fail to boot, displaying "L..."; if I select to install the lilo in the super block of the "root" partition then boot from grub, it would fail too, because I found that there is no way to mount the Linux partitions of the external HDD in the grub cmd line. When I say "root (hd0,4)", it would halt without any prompt; If I say "root (hd0," then press the Tab key, instead of listing the partitions on hd0, it would halt too. If I set the root partition of the Linux install as the second primary partition and install Slackware distro to it, the grub would show error either saying it cannot recorgnize the ext4 file system(ext4 fs, sda2) or unable to mount selected partition(ext2 fs).
 
Old 01-03-2011, 10:25 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,304

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
I feel you are falling between 2 stools. The situation is this: Either

1. People boot from an internal hard drive, and then eventually that loads a driver for the usb, or
2. You boot from usb, in which case the bios wakes up the usb in some elementary way, and says "He's booting from usb: There you go." to the usb drive.

What is less possible is a boot from the hd which uses the usb for the kernel, because of the catch-22. You will be specifying sdb (Or something), and sdb isn't visible until you have a kernel that has woken up the usb.

I would try searching the net for guys who have wasted part of their lives trying this and came up with something. Don't bother to read anything that says it is easy; When some guy says: "This was a bitch to do, but I got it" That's the report you want. If you want to have a go, maybe compile in usb in the kernel, and store the kernel internally with a decent sized initrd. Have your /boot partition on sdaX, and your / on sdbX At least that gives you a direction to go in.
 
Old 01-03-2011, 08:01 PM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

How do you have the usb setup in the BIOS?
 
Old 01-03-2011, 08:54 PM   #4
sdrkyj
LQ Newbie
 
Registered: Jan 2011
Posts: 13

Original Poster
Rep: Reputation: 1
Unhappy

I can get Slax boot up under grub from my portable USB HDD ntfs partition specifying the kernel and initrd.
I just press Esc key at boot time and select boot from the portable HDD.
I cannot run "root (hd0,4)" in grub cmd line or it halts.
If I run "root (hd0,1)" it says "cannot mount selected partition".
The version of grub is grub4dos 0.44.
I don't want to resize my internal HDD.

Last edited by sdrkyj; 01-03-2011 at 09:14 PM.
 
Old 01-03-2011, 10:38 PM   #5
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Initial Reaction

Quote:
Originally Posted by sdrkyj View Post
I can get Slax boot up under grub from my portable USB HDD ntfs partition specifying the kernel and initrd.
I just press Esc key at boot time and select boot from the portable HDD.
I cannot run "root (hd0,4)" in grub cmd line or it halts.
If I run "root (hd0,1)" it says "cannot mount selected partition".
The version of grub is grub4dos 0.44.
I don't want to resize my internal HDD.
Greetz
I think you are trying to compare apples to oranges here. Slax is still primarily a LiveCD distro. It can indeed be easily installed to hard drive with the built in "liloinst.sh" but "/" (root) is still unpacked on the fly to a ramdrive NOT on any hard drive partition. Support for ramdrives come very early in the kernel process and importantly here, long before hdds are assigned a device name. Therefore Slax is very comfortable on an ext drive. It seems to me you may have to build an initrd that will effect a proper handoff, loading things you need before they are needed instead of after, if you want the persistent root partition to be found and loaded properly as in a normal full Slackware install.
Hope this helps
 
Old 01-03-2011, 11:14 PM   #6
sdrkyj
LQ Newbie
 
Registered: Jan 2011
Posts: 13

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by enorbet View Post
Greetz
I think you are trying to compare apples to oranges here. Slax is still primarily a LiveCD distro. It can indeed be easily installed to hard drive with the built in "liloinst.sh" but "/" (root) is still unpacked on the fly to a ramdrive NOT on any hard drive partition. Support for ramdrives come very early in the kernel process and importantly here, long before hdds are assigned a device name. Therefore Slax is very comfortable on an ext drive. It seems to me you may have to build an initrd that will effect a proper handoff, loading things you need before they are needed instead of after, if you want the persistent root partition to be found and loaded properly as in a normal full Slackware install.
Hope this helps
the content of menu.lst should be
title ...
root ...
kernel ...
initrd ...

"kernel /vmlinuz-huge-smp-2.6.33.4-smp root=/dev/sda4" fails, displaying "invalid or unsupport excutable binary format". And somebody says that it doesn't need a initrd file while using the huge smp kernel of Slackware 13.1.

I installed Slackware to the logical partition of portable HDD and grub4dos doesn't help to bootup. Should I use other bootloaders? I read that there may be some limitations on USB portable HDD or BIOS or grub. My portable HDD is 1TB, the primary partition is 900 GB ntfs. Maybe I can only set the boot partition at the beginning of the disk.

Last edited by sdrkyj; 01-03-2011 at 11:48 PM.
 
Old 01-04-2011, 12:34 AM   #7
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Just a Posibilty

Greetz
Personally I hate initrd and always build kernels so they don't need it. I no longer have "huge-smp" on my box so I can't easily check to be certain but I don't think even "huge-smp" loads USB or eSATA support early enough to boot successfully with Grub from external hard drives. I am playing with trying to get Slax's lilo (and the way Slax saves changes) to allow a persistent "/" partition but it is not a high priority since it runs fine, as is, on my ancient laptop with sufficient ram. I would have left it on USB stick for newer boxen if so many didn't die so easily with constant rewriting.

Anyway, the issue seems to be having to declare a root location that cannot be found until too late in the kernel process.
 
Old 01-04-2011, 12:47 AM   #8
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
This is why I've heard talk of using the rootdelay parameter to the kernel. Searching the forums for rootdelay may give you a few pointers about USB booting as well.
 
Old 01-04-2011, 01:00 AM   #9
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
I used to boot to an external USB hard drive by installing lilo to the external drive's MBR. I then had to tell the PC's BIOS to boot from an external USB device, (which is setting on my machine), and I had to add this line to lilo.conf (I boot using lilo).
Code:
append="rootdelay=30"
this was necessary to make the kernel load wait sufficient time for the usb drive to be recognized. This worked fine with the huge kernel but when I built the generic, (which is recommended), I had to add the drivers to my initrd for the file system, (ext3), and also the usb storage drivers ehci-hcd and usb-storage on this machine. I also added "-w 30" to the mkinitrd command to be sure the loading delayed. This all worked fine and I then went on to load lilo to an internal drive which I booted the external drive from. Using the same techniques ,(and also mounting the external drive first before running lilo), made this work fine too. As you use grub I think the mount first step is not needed.

So, in a nutshell, I think you should first look at adding a rootdelay= option to the kernel boot up line (i.e. a grub option) then maybe installing a boot loader to the MBR of the external drive if your machine may boot from an externally attached USB device. In any case you should be OK using a bootloader on the internal drive and booting to the external USB drive.

One oddment I found when using a friends laptop which had the ability to boot from an external USB drive is my existing USB drive wouldn't boot when attached. It was not an option to install another boot loader to his internal hard drive so I had to boot using a specially made DVD and adding the "root=" kernel parameter. Very much like the option the Slackware install DVD gives you to boot to an existing Slackware installation.

You should be able to get this working - if you need more information on the methods I mention googling around will give lots of help.

Edit: Apologies for perhaps repeating the tip given by T3slider - I was typing this in and checking it as he posted.

Last edited by bgeddy; 01-04-2011 at 01:02 AM. Reason: Additional information
 
Old 01-04-2011, 04:46 AM   #10
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Slackware works very nicely in a USB hard drive.

To speak from my own experience, I usually use an external e-SATA HDD Case, Scythe Kamazo 2 e-SATA, which is fitted a 2.5” SATA Seagate Momentus hard drive, which has 80G.

How is it partitioned?

Code:
bash-4.1# parted -s /dev/sde print
Model: Generic External (scsi)
Disk /dev/sde: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 1      32.3kB  1999MB  1999MB  primary  linux-swap(v1)
 2      1999MB  20.0GB  18.0GB  primary  ext4            boot
 3      20.0GB  80.0GB  60.0GB  primary  ext4
So, partition 1 is a 2G swap, partition 2 have 18G and here is installed the Slackware-current system, and partition 3 have 60G and is used for data. Of course, the main function is to be used for data transport.

How it works?

I use the standard generic kernel, with initrd. The mount points is determined using UUID's. In this way, the kernel always finds the correct Linux partitions.

For that I must use a complicated command to generate the initrd, I use a small script, /boot/mkinitrd-2.6.35.7-smp.sh:

Code:
#!/bin/sh

KVERSION=2.6.35.7-smp
ROOTFS=ext4
ROOTDEV="UUID=88b404f5-9cc0-4235-a876-818bddcb9a35"
MODULES="ehci-hcd:uhci-hcd:ohci-hcd:usb_storage:jbd2:mbcache:ext4"

mkinitrd -c -k $KVERSION -f $ROOTFS -r $ROOTDEV -m $MODULES -o /boot/initrd-$KVERSION.gz -w 5 -u -R -L
Also, here is the /etc/fstab:

Code:
UUID="fe7445bd-da65-4f21-81d4-c4d1acbdd071"       swap             swap        defaults          0   0
UUID="88b404f5-9cc0-4235-a876-818bddcb9a35"       /                ext4        defaults          1   1
UUID="50c636f8-b07f-4281-9520-9b52c4b956d1"       /mnt/data        ext4        defaults          1   2
#/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
And the /etc/lilo.conf:

Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section

lba32 # Allow booting past 1024th cylinder with a recent BIOS

# Append any additional kernel parameters:
append="console=tty1 vt.default_utf8=1 video=1024x768-24@60.0"

boot = /dev/sdb

map = /boot/boot.map

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
#bitmap = /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.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
message = /boot/boot_message.txt

# 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 = 100

# Override dangerous defaults that rewrite the partition table:
change-rules
reset

# Normal VGA console
# vga = 5
# VESA framebuffer console @ 1024x768x64k
vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-smp-2.6.35.7-smp
    root = "UUID=88b404f5-9cc0-4235-a876-818bddcb9a35"
    label = Linux-generic
    initrd = /boot/initrd-2.6.35.7-smp.gz
read-only
# Linux bootable partition config ends

# Linux bootable partition config begins
image = /boot/vmlinuz
    root = "UUID=88b404f5-9cc0-4235-a876-818bddcb9a35"
    label = Linux-hugesmp
    initrd = /boot/initrd-2.6.35.7-smp.gz
read-only
# Linux bootable partition config ends
An interesting note about LILO, is that when you update it, you must use your real boot device, then: lilo -b /dev/sde, for example.

Otherwise, I have a typical installation of Slackware, with all the bells, including KDE4.

However, I do not recommend using a custom /etc/X11/xorg.conf, because X.org should work on different systems. In most cases, it manage to self-configure.

One last question, how we find the partition's UUID?

For this we use blkid.
 
1 members found this post helpful.
  


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
How to boot Slackware Linux from my Seagate External HDD? sdrkyj Linux - Software 2 01-03-2011 08:45 PM
How to add hdd with Linux booted DreamerX Linux - Hardware 4 11-08-2007 10:00 AM
booting machine with linux on an external HDD without HDD connected drsoum Linux - Newbie 2 07-22-2007 03:47 AM
Booting Slackware to USB External HDD linux_weenie Slackware 1 05-15-2005 09:47 PM
How do i Install Slackware 10.0 onto an external HDD Ravenscythe Linux - Newbie 2 08-31-2004 06:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:31 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