frugal on compact flash


Forum: HD Install
Topic: frugal on compact flash
started by: anarchistic

Posted by anarchistic on April 19 2007,07:27
Hi all,

I'm running a P4/1G w/ CDROM on IDE0 Master and an in-built compact flash reader as IDE1 Master (4GB Transcend 120x).  The CDROM is just for install and will ultimately not be in the box.  The CF card always comes up as hdc (I have to specify 'nopcmcia').

Using DSL v3.3 with 'Frugal on CF' install script (option 5), I get to the part "Setting up lilo" fine, then it spits out a whole heap of errors as follows:

Code Sample
ide-scsi: hda: unsupported command in request queue (0)
end_request: I/O error, dev 03:00 (hda), sector #

Where #=0,2,4,6 (same error 4 times) and the whole sequence repeats 6 times (I think) for a total of 24 nearly identical errors - just the sector numbers change.  At the bottom it says "Added DSL *", then in green "Installation complete."

When I reboot from CF card, I get a blinking underscore and nothing else.

So it appears it's having issues writing Lilo to the CF card.  I mount on another Linux box via CF-USB adapter and verify that boot, KNOPPIX, and Lost+Found exist on the card as I suspect they should.  And 'df-h' shows 50MB of my 200MB partition is used.

To prep the card I overwrote the first 512 bytes using dd ('cause I had GRUB on there before) and then cfdisk to create a bootable 200MB Linux partition.  I used the format in the frugal script to make it ext2.  And I rebooted the system in between the cfdisk and the frugal install script.  I chose all of the 'conservative' options in the install script - no other partitions and default Xvesa.

Any suggestions please?

Posted by curaga on April 19 2007,15:11
Seems everything got there exept lilo. Just boot DSL cd and install lilo manually (no idea how to do that, I use grub)... If you can't get lilo working, try grub... (note: for grub it will be (hd0,0) since it's the first hard disk thingy)
Posted by Juanito on April 19 2007,15:25
A similar thing happened to me on an scsi hd frugal install and I (finally) managed to manually set up a lilo boot by creating and saving lilo.conf in beaver.

Here is my lilo.conf file as an example:

lba32          #enable large disk support
timeout=30     #wait 3 seconds before auto-booting
vga=791
boot=/dev/sdb3   #put Lilo boot loader in partition of target disk
root=/dev/sdb3   #set root to be partition of target disk
image=/boot/linux24
label=DSL
initrd=/boot/minirt24.gz
read-only
APPEND="ramdisk_size=100000 init=/etc/init lang=us apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce nodma quiet frugal BOOT_IMAGE=/KNOPPIX/KNOPPIX fromhd=/dev/sdb3 restore=sdb4 toram alsa mydsl=sdb4"

You could probably delete all (most?) of the hdx=scsi statements.

Once you've created lilo.conf, you need to do this before re-boot:
Code Sample
# chmod 644 /mnt/sdb3/boot/lilo.conf
# ln -sf /mnt/sdb3/boot /
# lilo -C /mnt/sdb3/boot/lilo.conf

Posted by anarchistic on April 20 2007,06:08
@curaga:  As far as I understand it, grub is not an option.  My CF card adapter is direct-mounted on the motherboard - this is not a normal PC.  It's an < Arcom Apollo >.  I read in another post on here that the mo-bo mounted CF interface was hardwired to be IDE1 Master.  And if I specify "nopcmcia" on boot, it always appears as hdc.  What I've inferred is this: hda=ide0 master, hdb=ide0 slave, hdc=ide1 master, etc. Am I right or off track here?  Anyway, I've also read that grub needs MBR of hda, so I can't use grub.  This disk won't be hda, right?

Please tell me if I've put all the pieces together correctly for the above info - if not I may be wasting a whole lot of time with this...

@Juanito:  Thanks for this, it's what I've been trying to do mostly.  I've got the lilo.conf file as I believe it should be (pretty much the same as yours).  But my problem was in getting the lilo program to run on the CF card.  I think it was trying to write to the CD as it kept spitting out "Fatal: creat /boot/map~: Read-only file system".  Even though I thought the CD loads into ram and thus the file system should be writable...
Anyway, I tried it with the symlink and it finishes with "Added DSL *", but still doesn't boot.

Aah, I just went and examined frugal_lilo.sh and now I see how it tries to write lilo to the disk and where those commands come from.  I tried to replicate them, but received the same errors.  It appears Lilo just can't/won't write to the CF card.

I'm not sure if this is relevant or not, but during boot, this is displayed:
Code Sample
hdc: attached ide-disk driver.
hdc: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: task_no_data_intr: error=0x04 { DriveStatusError }

Anyway, my solution so far has been to do the frugal lilo install to a standard 3.5" disk and dd copy it to the CF.  But that hasn't worked yet.  I'm still going.

I tried to run lilo the same as suggested above, but onto my 3.5" disk (hda) after the frugal install, to overwrite lilo with the lilo.conf altered to reflect the fact that it would be on hdc, not hda (so I could dd copy with no problems).  But lilo won't run if the specified boot partition isn't on the disk it's running on - at least, I think that's what the error message meant.  Is there anyway to force lilo to disregard the contents of the lilo.conf file and just do it?

Thanks.

Posted by curaga on April 20 2007,17:09
MBR just means the first 512 bytes of an hd. Why wouldn't a cf card have those? hda is just the most common hard disk, grub can boot from any disk or partition marked as bootable (not even MBR is needed).

From googling I see that many have gotten grub working on cf. Try it!

Posted by anarchistic on April 23 2007,04:54
The second post of < this thread > says "Grub will insist on the MBR of hda".  Hence, that's exactly what I thought.

A grub install straight from the LiveCD doesn't work.  I'm assuming this is because the device map is wrong.  I edit the device map, but then grub-install fails for that device (/dev/hdc or /dev/cloop does not have a corresponding bios drive).  So I symlink /boot to /mnt/hdc1/boot the same as the instructions above, and then grub tells me that /boot/grub/stage1 does not exist.  I've verified that it's there - it definitely exists.

In order to completely remove the effects of other IDE devices I've installed DSL to a USB key and am trying to run from there.  And now I find that neither method of installing to USB drive works properly either.  (As a side note, I changed "KNOPPIX" to "knoppix" as suggested in another thread, but my method of booting still did not work [boot: install nopcmcia].  If I let it boot normally, then exit the window manager, it works.)

After booting from USB, I install to the CF using the grub option.  Now I try to run grub-install again and it says "/grub/stage1" does not exist.  I have even symlinked /grub with /mnt/hdc1/boot/grub - just in case /grub means 'grub in the root directory'.  But this doesn't work either (same error).

DSL is driving me insane.

Please, what else can I do?

Posted by curaga on April 23 2007,16:33
That comment may be for 0.91, or the grub-install script. I've never seen anything like that (guess because I always install grub from "grub" not "grub-install"). If you delete device.map and run grub as root (sudo won't work, use sudo su before typing grub) it will probe for drives.

Grub-install is a script, it cannot detect everything or even work everytime. I really think you should get grub-splash.dsl, and install grub using the instructions there - assuming you still have that install and it installed everything except grub...

Posted by anarchistic on May 01 2007,03:24
Ok, thanks for your help, mate.  I've tried what you suggested.  I ran grub setup inside the grub shell on my drive and it said it finished fine.

I don't know if grub reads the device.map from the drive or the root filesystem, I tried it both ways.  Even then, I don't know that grub reads device.map at all, because neither way worked.  I need to install DSL with one hardware configuration, then run it from another (plus and minus the CDROM on the first IDE channel) - I had a theory that this was breaking grub, but I have no evidence to support it.  It just doesn't work any which way I try to run it.

I've given up on grub, lilo and dsl, I'm gonna go back to syslinux on a FAT partition.

Thanks again.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.