Installing/booting Visopsys from USB?

General discussion about Visopsys.
User avatar
~
Posts: 8
Joined: Thu Mar 17, 2011 7:07 pm

Installing/booting Visopsys from USB?

Post by ~ »

What can be expected to happen if Visopsys were to be booted from an USB mass storage device, like a hard disk in a case or just a memory stick?

If it can be booted from a regular hard disk, I guess it could be booted from USB, but I suspect that distinguishing that fact and actually controlling the USB disk properly wouldn't be straightforward.

So what can be expected if the OS is installed and booted from USB?
User avatar
andymc
Posts: 589
Joined: Tue Nov 16, 2010 7:20 pm

Re: Installing/booting Visopsys from USB?

Post by andymc »

Hello, yes you've got all the factors correct. The current, released version (0.7) doesn't boot from USB because it relies on the OS loader to tell it which device it was booted from, but the OS loader has no way to know that it's a USB device.

The current development version (0.71) does not rely on the OS loader; instead, after all the disks are detected, the kernel searches for the boot sector with the correct signature (passed to the kernel by the OS loader).

So, 0.71 will boot from USB when it's released. I can give you a preview version if you're interested in playing with it.

Andy
User avatar
~
Posts: 8
Joined: Thu Mar 17, 2011 7:07 pm

Re: Installing/booting Visopsys from USB?

Post by ~ »

andymc wrote:Hello, yes you've got all the factors correct. The current, released version (0.7) doesn't boot from USB because it relies on the OS loader to tell it which device it was booted from, but the OS loader has no way to know that it's a USB device.

The current development version (0.71) does not rely on the OS loader; instead, after all the disks are detected, the kernel searches for the boot sector with the correct signature (passed to the kernel by the OS loader).
The explanation is clear.

Just one more question:

The signature in question is the "signature" created by a partition/formatting program? If so, how to prevent an error if there are multiple signatures that match the one that was booted from? If so, would it be possible to use the disk signature itself of IDENTIFY command instead (for ATA devices), recording it somehow at boot time?

andymc wrote:So, 0.71 will boot from USB when it's released. I can give you a preview version if you're interested in playing with it.

Andy
That will be very good if possible. The fact is that I'm still in the process of really understanding kernel stuff (I don't figure out enough of Visopsys code yet, just a tiny fraction of it, but I'm working on it; and you can see what programming level I have in (URL) this web site which is a site made completely by me, even its design, and shows the best I'm capable of doing and understanding currently).

Anyway I will ask for help from time to time when I run short of knowledge on a particular element, specifically of Visopsys and the used algorithms.
User avatar
andymc
Posts: 589
Joined: Tue Nov 16, 2010 7:20 pm

Re: Installing/booting Visopsys from USB?

Post by andymc »

~ wrote:The signature in question is the "signature" created by a partition/formatting program? If so, how to prevent an error if there are multiple signatures that match the one that was booted from? If so, would it be possible to use the disk signature itself of IDENTIFY command instead (for ATA devices), recording it somehow at boot time?
Yes, the signature is a time-based (UUID-based) unique signature written by the installers. The only time that wouldn't work, I think, would be if someone did a sector-by-sector disk copy, and had both present in the system at boot time. At present, the kernel would pick the first match. In future it might be good if the kernel can recognise that there is more than 1 boot sector match, and ask which one to boot / offer to "re-unique-ify" them.
~ wrote:
andymc wrote:So, 0.71 will boot from USB when it's released. I can give you a preview version if you're interested in playing with it.
That will be very good if possible.
Your wish is my command. ;) This doesn't have all of the latest bleeding-edge stuff I've been working on, but has the new booting stuff and USB improvements:
http://visopsys.org/files/misc/visopsys ... 19-iso.zip
El_Matador
Posts: 18
Joined: Mon Mar 07, 2011 2:38 am

Re: Installing/booting Visopsys from USB?

Post by El_Matador »

Andy: could you tell me how to install Visopsys on my USB flash drive?
++++++++++[>+++++++<-]>++.<+++[>++<-]>+.<++[>--<-]>+.<+++[>---<-]>--.
User avatar
andymc
Posts: 589
Joined: Tue Nov 16, 2010 7:20 pm

Re: Installing/booting Visopsys from USB?

Post by andymc »

Sure.

The native installer inside the ISO image can install to USB (you should partition the stick, write an MBR, set Visopsys partition active, just like you would with a hard disk). If you use the development version I linked above, it should be able to boot from USB in many/most cases.

If you were working from a source code distribution (which I haven't posted yet), you could use a script in the utils/ subdirectory called image-usb.sh which creates a small, 32-meg image which you can write straight to the stick. That one has all the partitioning, etc., done already.
El_Matador
Posts: 18
Joined: Mon Mar 07, 2011 2:38 am

Re: Installing/booting Visopsys from USB?

Post by El_Matador »

Is the installer supposed to recognize my USB? I have connected it but the only thing the installer sees is the hard disk.
++++++++++[>+++++++<-]>++.<+++[>++<-]>+.<++[>--<-]>+.<+++[>---<-]>--.
User avatar
andymc
Posts: 589
Joined: Tue Nov 16, 2010 7:20 pm

Re: Installing/booting Visopsys from USB?

Post by andymc »

It should, if it is partitioned. Are you using the image I posted above, or an older one?
El_Matador
Posts: 18
Joined: Mon Mar 07, 2011 2:38 am

Re: Installing/booting Visopsys from USB?

Post by El_Matador »

It is partitioned and I am using the image posted above.
++++++++++[>+++++++<-]>++.<+++[>++<-]>+.<++[>--<-]>+.<+++[>---<-]>--.
User avatar
andymc
Posts: 589
Joined: Tue Nov 16, 2010 7:20 pm

Re: Installing/booting Visopsys from USB?

Post by andymc »

Is the USB plugged in at boot time, or are you hot-plugging it? If you open a command window, and type 'disks', does it seem to be shown? (the name will probably be something like sd0). If you look in the console window, and you plug in your USB, do you see any error messages?
Post Reply