WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to make scsi driver persistent through reboot?  (Read 7067 times)

Offline simonb

  • Newbie
  • *
  • Posts: 6
How to make scsi driver persistent through reboot?
« on: January 19, 2011, 06:12:05 AM »
I have a TinyCore disk that I created on VirtualBox and imported into VMware ESX.

As it is the VM somehow manages to boot off the SCSI disk OK but when it gets to the desktop no disk partitions are visible. It is as if it is running in thin air!

I understand from other threads that I need the scsi-2.6.33-3 package installed and to select the Buslogic SCSI adapter in VMWare. If I do that I can see the disk partitions again.

Once I have mounted /dev/sda1 again, what do I have to do to make the scsi module persistent through the next reboot?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to make scsi driver persistent through reboot?
« Reply #1 on: January 19, 2011, 07:42:26 AM »
Since you would otherwise have a catch-22 loading the extension, add the scsi extension to a separate initrd:

http://tinycorelinux.com/wiki/Dynamic+root+filesystem+remastering#Create_remaster_content

If you use grub instead of the syslinux family loaders, add the created gz to tinycore.gz with cat:

cat tinycore.gz myscsi.gz > tinycore_with_scsi.gz

Then edit the boot entry to use this initramfs.
The only barriers that can stop you are the ones you create yourself.

Offline simonb

  • Newbie
  • *
  • Posts: 6
Re: How to make scsi driver persistent through reboot?
« Reply #2 on: January 19, 2011, 09:45:25 AM »
Thanks, that worked as far as being able to see the drive now.

But now the extensions aren't loaded. I've tried setting restore=sda1 but it doesn't make any difference and it didn't used to need that option when it was working in Virtualbox.

I have removed the IDE controller (in case it was trying to restore from hda) but this also doesn't fix it.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to make scsi driver persistent through reboot?
« Reply #3 on: January 19, 2011, 09:59:41 AM »
Hm, tce-setup currently tries to mount the device with the main tce dir before loading from /opt/tce.

I was writing about adding a tce-setup call to bootsync.sh, but of course that isn't possible with your situation.
I'm afraid this setup can't be currently automated without a remaster. You can load the extensions after boot with the command "sudo tce-setup", though.
The only barriers that can stop you are the ones you create yourself.

Offline simonb

  • Newbie
  • *
  • Posts: 6
Re: How to make scsi driver persistent through reboot?
« Reply #4 on: January 19, 2011, 10:11:56 AM »
OK. Thanks. I'll give that a try in the next few days.

Offline simonb

  • Newbie
  • *
  • Posts: 6
Re: How to make scsi driver persistent through reboot?
« Reply #5 on: January 20, 2011, 06:34:35 AM »
Also, are there any plans to include VMWare-compatible drivers in the standard build?

Tinycore as a VM is cool!

I am currently building very simple VMs to do single-tasks on VM hosts. If you can run a server in 30MB instead of several GB and use 32MB of RAM instead of hundreds of MB of RAM then it means you can run many more VMs on the host server. I just got an Icecast webcasting server down to less than a 30MB image.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to make scsi driver persistent through reboot?
« Reply #6 on: January 20, 2011, 10:26:50 AM »
It's my understanding that VMWare can be configured to use IDE/SATA discs too, even though it defaults to SCSI. These would be already supported in the base.

If this is still the case, I don't see a good reason to add ~150kb just for one VM's SCSI support.
The only barriers that can stop you are the ones you create yourself.

Offline simonb

  • Newbie
  • *
  • Posts: 6
Re: How to make scsi driver persistent through reboot?
« Reply #7 on: January 20, 2011, 10:31:28 AM »
I don't have access to check right now but when I checked the configuration last time there is no option on ESXi 4.1 for IDE or SATA. There are just two types of SCSI and the paravirtual. It may be different for older versions of VMware desktop.

The scsi package may be 150k but that's full of different drivers. I guess only one of them is actually required to make it work with ESXi.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to make scsi driver persistent through reboot?
« Reply #8 on: January 20, 2011, 10:41:31 AM »
No, the 150kb figure is just the VMWare stuff. The complete SCSI extension is 1.5mb.

From quick googling it looks like it's not an option in the guis/whatever, but can be edited in the config file:
http://sanbarrow.com/vmdk/vmx-ide2scsi.html
The only barriers that can stop you are the ones you create yourself.

Offline simonb

  • Newbie
  • *
  • Posts: 6
Re: How to make scsi driver persistent through reboot?
« Reply #9 on: January 20, 2011, 10:59:24 AM »
OK. Thanks for looking up the info.

I understand about the driver.

I have created a new tinycore.gz which I will try out when I'm working with VMware again.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to make scsi driver persistent through reboot?
« Reply #10 on: January 20, 2011, 11:42:46 AM »
After checking, 150kb is the LSI Logic one. BusLogic would only be 30kb, maybe small enough to include.

Before trying IDE, could you post lsmod output when booted with the BusLogic SCSI choice (and the scsi extension loaded, e.g. via the edited tinycore.gz)?

edit: If you have the time, could you also post the same with the paravirtual scsi choice? That one would only be 8kb.
« Last Edit: January 20, 2011, 11:51:25 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: How to make scsi driver persistent through reboot?
« Reply #11 on: January 20, 2011, 01:11:05 PM »
I don't have access to check right now but when I checked the configuration last time there is no option on ESXi 4.1 for IDE or SATA.

There is. I use it all the time. You have to select "custom" instead of "typical" when setting up a virtual machine or you won't see the option.