I'm trying to get the scsi extensions to persist on a frugal install and am having a lot of trouble.
The method I'm using is the dynamic remastering method referenced on the wiki [1], with some tips from the netbooting wiki page [2], and some helpful pointers sending me in that direction from genec on irc.
The full method to reproduce my issue is not that long (
not indicative of how long it took me to get here!!), so I'll explain it all for the sake of documentation.
First I boot up the CorePlus iso (v4.7.7 at this time) straight to "command line only" and make a frugal install like this:
tce-load -wi scsi-`uname -r` #to make the drive accessible!
tce-load -wi tc-install
#do a frugal install from CD...
# - yes to bootloader
# - core only
# - ext4 the whole disk
# - no to every other option
sudo tc-install.sh
If we reboot at this point it does not work because the install created has no scsi drivers. We need to add the scsi drivers to the intrd.
Per the links above, I now do the dynamic remaster like so:
mount /mnt/sda1
#Now make a working area to create a cpio archive that will extract
#to /tmp/builtin (where tce-setup looks for extensions during boot)
mkdir -p /tmp/tmp/builtin/optional
cp /tmp/tce/optional/scsi*.tcz /tmp/tmp/builtin/optional/
echo "scsi-`uname -r`.tcz" > /tmp/tmp/builtin/onboot.lst
#fix up permissions/ownership so unpacking doesn't wreck /tmp
# - may not be required (thought this was one of my issues)
sudo chown -R root:staff /tmp/tmp
sudo chmod 1777 /tmp/tmp
sudo chmod -R 775 /tmp/tmp/builtin
#make the cpio archive...
cd /tmp
find tmp | cpio -o -H newc | gzip -9 > /tmp/scsi-32.cpz
#Now set up extlinux to load the cpio archive to initrd
mv /tmp/scsi-32.cpz /mnt/sda1/tce/boot/
sudo sed -i "s|core.gz|core.gz,/tce/boot/scsi-32.cpz|" /mnt/sda1/tce/boot/extlinux/extlinux.conf
#Rebooting should work now...
sudo reboot
At this point, on reboot, the scsi drivers *are* loaded properly, but pretty much everything else has issues. A few symptoms are:
1. /mnt/sda1 does not automount (but /dev/sda1 is accessible/mountable)
2. tce-load does not work at all
Crawling through tce-setup and friends and doing some exploring I can see that at least one thing has a serious problem, and that is that the /etc/sysconfig/tcedir symlink is broken, incorrectly pointing to /tce which does not exist. I see that that dir being symlinked in three scripts (tc-config, tce-setup, and tce-setdrive), but can't yet figure out why it is failing.
What am I doing wrong? How do you properly make that cpio? Any other tips/fixes to my method above would also be appreciated.
Topic-wise (and to help future search hits), this involves remastering (dynamic, anyway), microcore, extensions, VMs / Virtual Machines in VMware (where my scsi issue crops up), etc... wasn't sure where to put it so I dropped it into general.
[1]
http://wiki.tinycorelinux.net/wiki:dynamic_root_filesystem_remastering[2]
http://wiki.tinycorelinux.net/wiki:netbooting