LinuxQuestions.org
Visit Jeremy's Blog.
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-30-2009, 11:38 AM   #1
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Question Install Lilo to CF card to boot from USB drive


Alright, here is the issue. I have a tablet PC with no CD/DVD drive, incapable of booting from USB. It can boot from 2 things: it's internal CF card (that acts as it's main hard drive) and a usb-floppy. Now, carrying around a USB floppy is cumbersome, so since the BIOS cannot read a CF card larger than 256mb, I am trying to install Lilo on the CF card, which in turn points to the USB drive to boot.

My setup is:

Device: /dev/sda
Only partition: /dev/sda1

Files in /dev/sda1:
Code:
etc -> lilo.conf

boot -> System.map
     -> boot.0340
     -> boot.0800
     -> config
     -> map
     -> vmlinuz
lilo.conf:
Code:
lba32
append=" vt.default_utf8=0"
boot = /dev/sda
#message = /boot/boot_message.txt
prompt
timeout = 300
change-rules
reset
vga = 773
default = "Linux"
image = /boot/vmlinuz
  #initrd = /boot/initrd.gz
  root = /dev/sda1
  label = Linux
  read-only
I try installing Lilo to the CF card using:
Quote:
lilo -v -b /dev/sda -C /mnt/usb/etc/lilo.conf
and receive:
Code:
LILO version 22.8, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2006 John Coffman
Released 19-Feb-2007 and compiled at 12:43:17 on Nov 29 2008.

Warning: Ignoring entry 'boot'
Reading boot sector from /dev/sda
Warning: /dev/sda is not on the first disk
Using MENU secondary loader
Calling map_insert_data
Warning: The boot sector and map file are on different disks.

Boot image: /boot/vmlinuz -> vmlinuz-huge-smp-2.6.27.7-smp
Added Linux *

Writing boot sector.
/boot/boot.0800 exists - no boot sector backup copy made.
3 warnings were issued.
Thus, when trying to boot the tablet, I see:
Code:
L 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9....
My usb drive contains almost a full install of Slackware, deselected series: E, F, K, KDE, KDEI, and Y. It is a 4 gigabyte drive. (has nothing to do with boot problem, I know.)

Any ideas as to how to get this working?

*remember: the CF card has an internal dock. Any installed system reads it as being /dev/hda
 
Old 01-30-2009, 12:55 PM   #2
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Use syslinux or extlinux for first boot, like Slackware CDROM.
 
Old 01-30-2009, 02:14 PM   #3
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Okay, I was able to install extlinux to the CF card, and the kernel boots. However, the kernel panics trying to find root.

Here is my extlinux.conf:
Code:
LABEL linux
        DEFAULT linux
        KERNEL vmlinuz
        APPEND  boot=/dev/sda root=/dev/sda1
When it tries to boot, it tries to give a list of available partitions and they are only the /dev/hda on the CF card. The USB drive is plugged in, and from my previous installs, I know for a fact that slackware reads the drive as /dev/sda. When is the drive mounted?

Here is exactly what it prints out:
Code:
VFS: Cannot open root device "sda1" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
0300     125184 hda driver: ide-disk
  0301     125085 hda1
Kernel panic - not syncing: VFS: Unable ot mount root fs on unknown-block (0,0)
Any ideas? Since the BIOS doesn't support USB booting, I'm trying to make a go-around, but so far I'm not doing so well.
 
Old 01-30-2009, 02:21 PM   #4
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
In order to boot a usb stick slax install on a pc that won't boot from a usb stick, one may create a bootable cd that will boot the pc, then turn it over to the usb stick. Perhaps if you had a look at the iso you could make some headway:

Code:
ftp://ftp.linux.cz/pub/linux/slax/SLAX-6.x/slax-boot-usb-from-cd-6.0.9.iso
cheers,
 
Old 01-30-2009, 04:01 PM   #5
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Well, I'll look at it, but remember: I have no CD or DVD drive.
 
Old 01-30-2009, 04:25 PM   #6
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
Quote:
Originally Posted by phantom_cyph View Post
Well, I'll look at it, but remember: I have no CD or DVD drive.
Ah...I realize that; I was thinking that since the iso accomplishes what you're trying to accomplish, perhaps there's something in filesystem that indicates how...like the initrd.gz

cheers,
 
Old 01-30-2009, 04:39 PM   #7
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
All right. I copied the contents of the iso (i.e. mount -o loop file.iso mountpoint/ , cp -R mountpoint /path/to/usb). Set up dos filesystem on partition for syslinux (before copying contents obviously), installed syslinux on the partition, and cat'd the mbr.bin file to /dev/sda.

Now, I get the error as soon as I start up:
Quote:
Multiple active partitions.
No operating system found.
Not sure if the CD's boot config is set to look for any ram filesystems, which is confusing it because it is on one or not. I have no idea.

Any clues? I'll keep messing around with it so see if I can get it to work till I have another suggestion.
 
Old 01-30-2009, 04:56 PM   #8
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Apparently the "/dev/ram0" was confusing syslinux and not even showing the boot menu. However: it still won't boot. Gives a message about how this should never happen, blah blah blah. Its like Linux hasn't loaded the USB or something. It should do that before it tried to mount the root filesystem shouldn't it?
 
Old 01-30-2009, 05:14 PM   #9
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Shouldn't you be pointing the 'root=' at the slackware root partition on your usb drive rather than at sda1? I'm assuming sda is your CF card as that's what you've specified as your boot= option.
 
Old 01-30-2009, 05:26 PM   #10
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
I may be way off the mark here - I used the slax-boot-usb-from-cd.iso yesterday on a pc that doesn't enable usb boot in the bios.

The way it "appeared" to work was that it loaded slax normally (as though I was simply booting from the cd), and at some point it in the process my usb stick was "discovered", and slax continued to load from there.

On a cursory examination of the iso contents, it doesn't "appear" to be any different than a normal slax live cd, ie., it contains the same files and scripts that the live cd does.

So, long story short, I don't know "how" that hand-off to the usb stick occurs; when I get the chance, I'll play around on the pc and see what the messages tell me.

That being said, on a totally different tangent, on that iso there are boot scripts in /boot, which one would run when installing slax to hd, or to usb stick. There is one script liloinst.sh that invokes lilo. I used it when creating my usb stick, which I had formatted ext3. The script contains a lilo.conf. I'm wondering if you could see anything in the script that may help you with your initial goal of installing lilo to your CF.

cheers,
 
Old 01-30-2009, 05:33 PM   #11
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
GazL: The internal CF card is read as /dev/hda, as it is the internal "hard drive". /dev/sda is the USB device.

mrclisdue, yah, the iso would probably work all nice and dandy, but remember: not only do I not have a CD drive, I have to make the USB look like a CD via the contents and syslinux, as well as the fact that Slax and Slackware are similar, but not the same.

I'm hoping someone has an idea because what I just said in this post I have said before, and this doesn't give me any clue as to where to go from here.
 
Old 01-30-2009, 06:31 PM   #12
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by phantom_cyph View Post
GazL: The internal CF card is read as /dev/hda, as it is the internal "hard drive". /dev/sda is the USB device.
Ahh, yes, I see that now you mention it Sorry 'bout that.

The next thing I'd be inclined to try would be to build an initrd and include that on the CF card. Looking at the output you posted from the extlinux boot, it didn't even list your sda device, so perhaps at that stage its still not been made available.
 
Old 01-31-2009, 03:41 AM   #13
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by phantom_cyph View Post
Okay, I was able to install extlinux to the CF card, and the kernel boots. However, the kernel panics trying to find root.

Here is my extlinux.conf:
Code:
LABEL linux
        DEFAULT linux
        KERNEL vmlinuz
        APPEND  boot=/dev/sda root=/dev/sda1
Why /dev/sda1? In your first post you mentioned that your CF card is hda.
 
  


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
HP notebook USB drive boot install angelo_maci Linux - Laptop and Netbook 4 05-19-2008 10:50 AM
Ubuntu 6.06 install on USB drive won't boot gudum35 Linux - Laptop and Netbook 2 10-08-2006 01:23 AM
install lilo/grub on a USB flash drive? flystar06 Linux - General 3 06-14-2005 08:48 PM
GRUB or LILO boot to SCSI drive on SCSI system w/ IDE card mkl838 Linux - General 1 03-06-2005 09:01 PM
Boot From USB Flash Drive in LILO? clearestchannel Linux - Newbie 1 01-01-2005 08:38 AM

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

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