General TC > Tiny Core on Virtual Machines

automatically mount /dev/sda1 with vm-scsi to achieve persistence

(1/2) > >>

beetle:
Hello all, my new challenge is to make my setup work on vmWare/vSphere. I can do it on VirtualBox but it is more tricky with the vm-scsi*package.

I managed to have the  vm-scsi* package installed but not to automatically mount /dev/sda1.

I think I need directions for actions early in the boot process to mount /dev/sda1 and make TC point into the filesystem to achieve persistence. I may be wrong but I think I'm pretty close!

Could I get help at achieving persistence on a setup where I need to mount the vmWare hdd drive early in the boot process?

Your help appreciated!

-Beetle

danielibarnes:
I use it this way, and it's why I created the extension. My solution for a .iso image is to use the qremaster script to load the extension earlier in the boot process. Basically, the vm-scsi extension is placed in /opt/tce within a cpio archive, which is the designated path for extensions that must be loaded early in the boot process.

Alternatively, you can use an IDE drive in your virtual machine which removes the need for the vm-scsi extension.

beetle:
Hi danielibarnes, I appreciate you help.

I looked into your script to figure what are the minimum steps required.

I did the following:

1/ generate a cpio archive with the vm-scsi extension files and put it on the hdd

--- Code: ---find vm-scsi*|cpio -o -H newc|gzip -2 >  /mnt/sda1/boot/vm-scsi.gz
--- End code ---

2/ adapt the initrd with initrd=/boot/tinycore.gz,/boot/vm-scsi.gz

--- Code: ---vi /mnt/sda1/boot/extlinux/extlinux.conf
--- End code ---

It did not work the first time, the 2 vm-scsi files (the .tcz and the .tcz.md5.txt) expanded in the root ('/') and were not loaded. I could manually load those with tce-load.
I retried making sure the path would be /opt/tce but it did not work either (I did not even find the files!).

Maybe you can guide me in what I do wrong?

Many thanks in advance.

-Beetle

danielibarnes:
Are you installing Tiny Core to /dev/sda or trying to boot from a Tiny Core .iso image? If you installed Tiny Core to /dev/sda then it is a bit tricky:

mkdir -p /tmp/vm/opt/tce/
tce-load -w vm-scsi-2.6.33.3-tinycore.tcz
cp $(cat /opt/.tce_dir)/optional/vm-scsi-2.6.33.3-tinycore.tcz* /tmp/vm/opt/tce/
echo vm-scsi-2.6.33.3-tinycore.tcz > /tmp/vm/opt/tce/onboot.lst
cd /tmp/vm/
find|cpio -o -H newc|gzip -9 > /mnt/sda1/boot/vm-scsi.gz

The edit the initrd exactly as you describe (assuming you are using extlinux as your bootloader).

If you want to create a Tiny Core .iso image with the vm-scsi drivers, execute:

sh qremaster vm-scsi-2.6.33.3-tinycore.tcz tinycore.iso vm-scsi.iso

where "tinycore.iso" is your original Tiny Core image. Copy the .iso image as necessary and boot from it.

beetle:
Thanks again, the installation part works great.

But somehow it is not automatically loaded. I still need to manually load it.

I tried adding lst=/opt/tce/onboot.lst in APPEND of extlinuxconf without success.

Maybe I need to modify onboot.lst that is in the tinycore.gz instead ? In which case I would need to rebuild it, maybe with the help of a remastering script?

There's gotta be an easier way..

-Beetle

PS: yes, I'm trying to boot from sda and have persistence there. I don't have IDE available in the vSphere I use. If all else fails I might try to have an iso that is resident in the vSphere server for the vm to have it available permanently. Currently, the iso is virtually loaded in the CDROM tray manually on the client side: it is unloaded as soon as the client disconnects, and somehow it always disconnects overnight. As of now, I no longer need to iso since the vm-scsi is available in the vm. It is just not automatically loaded and I don't know how to use a startup script in that scenario since my data & scripts (on sda) are not yet available at boot time.

...that one tiny part that is missing...

Navigation

[0] Message Index

[#] Next page

Go to full version