Advertisement

Booting from solid state disk.

Started by January 21, 2004 01:48 PM
9 comments, last by griffenjam 21 years ago
Has anyone ever looking into setting up a solid state disk for booting from. Also, how would one go about converting a running system to boot from a solid state device. I know you would have to copy the /boot directory to the device, but what about all the system services (apache, logging, SSH Server...) could you put those on the flash drive as well and still be able to install apps?
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
Eh? a solid state disk is just alike a normal disk. except it has no moving parts.

There''s not difference from the software point of view. Unless its connected by a different bus, which is true of any disk (IDE, SCSI, USB, IEEE1394)
Advertisement
Just realized...

Do you mean to ask how you could boot from a device attached (say) via usb?

Well, you can''t. You need a BIOS which recognizes USB devices in order to do that.

Now, embedded systems come with such a "BIOS"...
i''m pretty sure my N-Force2 mobo can boot from USB devices...
on e-bay I''ve found solid state flash disks around 800Megs to a gig in size that connect via IDE. How hard would it be to boot with this device, load all services off it, then change the / mount point to another IDE device without interupting the services that are running.

The only problem I see is that the boot service I mentioned are stored in the same places that other apps get loaded to. I don''t want to get an 800 meg drive to load all my programs to and then run out of space because I''ve installed other programs.
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
Connects via IDE? Piece of cake. hideously simple.

Changing the mountpoint? not so simple. pivot_root might help, but I''m not sure you''d get any "seamlesss" transition with any already runnign services.

What exactly, are you trying to do? i mean... why?
Advertisement
I imagine that you know a bit about DOS/Windows as well. What I want to do is comparable to putting the C drive on a solid state IDE drive. The space would be limited so I would have to install all programs to the D drive. However the OS and anything that starts with the computer would be on C and would be able to be loaded much quicker.

On Linux it''s not that simple. The startup services are loaded in the same place that apps are and many apps break if you install them somewhere else.

I know I can have the /boot partition on the flash drive, I could also put /tmp there and have my swap space there, but the bulk of my startup time is spent starting up things like apache, sshd, samba..... can I move just those apps to the flash drive somehow and not break anything in my system?
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
Swapping on a CF card is the number one way to kill it in a couple of weeks. Those things have a lifetime of not-very-many write operations, so if you''re booting from it, mount it read-only.
quote:
Original post by griffenjam
I know I can have the /boot partition on the flash drive, I could also put /tmp there and have my swap space there, but the bulk of my startup time is spent starting up things like apache, sshd, samba..... can I move just those apps to the flash drive somehow and not break anything in my system?


What you could try is to install Apache, etc. into some directory not under /usr, and then have symlinks from /usr/bin on the solid state card to those executables. Then, once they've started, mount some hard drive partitions over /usr, /home, and /var. Make /tmp a symlink to /var/tmp, and you could probably get away with /lib as a link to /usr/lib. Then, you can start your boot services from a solid state drive mounted read-only, and then mount all you hard drive partitions and have a relatively normally functioning system.

I'm still not sure why you'd want to do this, though.

Another solution, if you want to do it as near 'properly' as possible: modify /sbin/init to start up some boot services, mount an IDE hard drive somewhere in /mnt, chroot into it, and then carry on as normal. If you want to do that, the source for init should be in a util-linux package, IIRC. [EDIT: Nope, it's sysvinit.]

[edited by - sbennett on January 23, 2004 12:40:36 PM]
aha. MUCH easier to do with linux.

Watch this:

hda = CF card (READ ONLY)
hdb = IDE disk

hda1 = /

hdb1 = /usr/local
hdb2 = /var
hdb3 = /home

symlink /tmp and /usr/tmp to /var/tmp
maybe do a few more symlinks

TADA! Now it doesn''t even feel like a system with two drives.

This topic is closed to new replies.

Advertisement