You are not logged in.

#1 2009-09-06 10:14:47

unrealnet
Member
Registered: 2009-09-06
Posts: 2

Boot from flash drive with fallback to internal hdd

Hello,
Recently I got myself a nice present - OCZ Throttle 8GB eSATA/USB drive. Unluckily my notebook doesn't support eSATA booting, which leads me to dead end if I want to use the eSATA drive to put my Linux system on. ( Tried to boot through GRUB, several other bootloaders but they all can't see the eSATA drive during bootup).

So I got wondering - is it possible to install Arch on the internal harddrive, then create a custom kernel/initrd which would check if the flash drive is present and boot from it, else failover to the internal hard drive and boot the system from the hard drive. (in short: use the kernel to load drivers and then continue booting from flash)

I intend to keep the flash drive and the hdd synced, so whatever happens to the flash drive i would have my whole system ready to boot from the internal drive.

I read through the wiki, but couldn't find information about if this approach is possible:
1) Boot from internal drive
2) Load kernel (with eSATA drivers)
3) Check if flash present
4.1) Continue booting from flash drive (switch from internal to flash)
4.2) Else continue booting from internal drive (as a fallback)

I suppose some initrd hacking is involved to do some checking for the presence, but too bad i am not that advanced sad

About the syncing - i got this part covered, so this is not a problem to be discussed here smile (Of course if you have some greater ideas than rsync, please share!)

Offline

#2 2009-09-06 16:19:33

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Boot from flash drive with fallback to internal hdd

Perhaps booting from flash drive is not all that great.  The speed of flash may cause a need for waits in the boot process.  Boot sequences are r/o and very little is gained in boot time from flash vs normal HDD.

The use of USB flash to boot into live ram OS is the best application providing ram speed performance.  This provides essentially r/o for the flash device and storage can be applied to associated HDD devices.

The OCZ throttle can run from USB 2.0 with good performance altho not 90MB/s.

One enticing application is to run raid0 on two OCZ Throttle devices for read speed of 180mb/s and write speed almost the same. In a USB 2.0 connection, the performance would be doubled for these devices in raid0.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2009-09-06 16:45:59

unrealnet
Member
Registered: 2009-09-06
Posts: 2

Re: Boot from flash drive with fallback to internal hdd

I have some progress on the problem, i managed to do it with an ubuntu distro, as Arch is giving me some partition errors and it works quite well. Taken down time from a near minute down to 30 secs from grub to desktop.

When i get more systematic progress on the problem I will post.

The thing that remains is how to put some IF's in the initrd to do fallback to the hdd in case, but I think i will leave it for now and optimize this to get faster boot with the flash. Btw spinning-disc hdd is always slower than solid state drives smile (for the seek time). As for the RAID ... i don't have more ports on the notebook, not to speak for extra money smile

Offline

Board footer

Powered by FluxBB