Personal computing discussed

Moderators: renee, SecretSquirrel, notfred

 
Serialnuker
Gerbil Team Leader
Topic Author
Posts: 218
Joined: Tue Jun 17, 2003 11:42 pm
Location: SC
Contact:

Booting linux off of a Compact Flash.

Wed Mar 19, 2008 5:42 pm

I have a friend that is taking Linux class, and he needs to install Linux on a computer in order to do his homework. He has a dell ultra mobile think pad that has a CF card reader. He wants to use the CF reader to host a CF that has Linux on it. His main reason for doing this is because his hard drive is very slow, and very small. He knows he wants an 8gb CF to host Linux on, but both him and I are still confused on all the other parameters to look for in a CF.

I have heard that they have limited read/write capability...some say 1-2 million read/writes...can some one elaborate on this and tell us what we should be looking for and if the r/w capacity will be a major problem?


We have been looking at speeds of CF...his card reader supports up to 133mb/s...if we get one less than that will he notice a difference?...what is a good standard for i/o on a card?


What is a good card to buy?...Is there any definitive answer to this, anyone have one they are using that is working out for them?


Anyone that is currently running an OS off of a CF or SD please let me know I would love to pick your brain about it! Any other information would be greatly appreciated!! :D

Thanks
-SN
When i talk smack it is usually cause i will win. If i dont talk smack, it is usually cause ill win, but since your bigger, i dont want you to beat the shiz outta me.
 
mortifiedPenguin
Gerbil Elite
Posts: 812
Joined: Mon Oct 08, 2007 7:46 pm

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 6:02 pm

Serialnuker wrote:
I have heard that they have limited read/write capability...some say 1-2 million read/writes...can some one elaborate on this and tell us what we should be looking for and if the r/w capacity will be a major problem?

That would be per bit. So every single of those bits could be written to 1-2 million times before it might start failing. With wear leveling (ensuring all bits are written to in relatively even amounts), these things should last upwards of 10 years before starting to fail. Also, there is no limit to the number of times you can read from NAND flash, just the number of writes.
2600K @ 4.8GHz; XSPC Rasa/RX240/RX120 Phobya Xtreme 200; Asus P8Z68-V Pro; 16GB Corsair Vengeance 1333 C9; 2x7970 OC w/ Razor 7970; Force GT 120GB; 3x F3 1TB; Corsair HX750; X-Fi Titanium; Corsair Obsidian 650D; Dell 2408WFP Rev. A01; 2x Dell U2412m
 
Hdfisise
Gerbil Team Leader
Posts: 212
Joined: Fri Feb 08, 2008 4:39 pm
Location: UK

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 6:13 pm

 
Usacomp2k3
Gerbil God
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 6:15 pm

Honestly, just install linux in a virtual machine and call it a day.

"Dell ultra-mobile think pad" So is it a dell or an IBM/Lenovo? He probably wouldn't mind a new hard drive, and that wouldn't be that much more than a good CF card.
 
UberGerbil
Grand Admiral Gerbil
Posts: 10368
Joined: Thu Jun 19, 2003 3:11 pm

Re: Booting linux off of a Compact Flash.

Wed Mar 19, 2008 6:18 pm

This is something I've considered trying, just as an experiment, but haven't got around to. I'd be interested in hearing how it works out if you go this route.

The tests these guys did might give you an idea; BobAtkins.com is a photography-oriented site but it has a lot of CF tests.

There's no issue with reads -- they're effectively unlimited. It's total lifetime writes you have to worry about. Flash is a lot better than it was a few years ago, though when you're going the DIY route with CF you're not going to get the benefit of some of the fancier techniques that SSDs use to extend their lifespan (wear leveling, etc). Most of the data in an OS install is read-only, but there are a few "hot" files that see a lot of writes -- most notably the swapfile -- that you have to worry about. But for just a semester, doing homework? I wouldn't worry too much about it. Let's say you're going to be using it 4 hours a day, 7 days a week, for 6 months. That's ~720 hours, or ~45000 minutes. You'd need more than 20 writes a minute every minute, to the same block, to exceed one million writes. That's certainly possible with the swapfile during extensive usage, but I doubt your friend will sustain that.

Slow laptop hard drives are going to be way less than 133MB/s -- more like a third of that. So Flash can be faster, at least on reads. But depending on how the card reader is hooked up, it may in fact be much slower: it may say it can handle Flash that fast, but if it's on a USB port internally (as many are) it's not going to break 40MB/s anyway. In which case you might as well just get an external USB harddive (or, better, an external USB housing and a hard drive you buy yourself). Or Firewire, if the laptop has that and you can afford it.
 
Hance
Darth Gerbil
Posts: 7775
Joined: Mon Sep 29, 2003 1:58 pm
Location: Grace Idaho
Contact:

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 6:19 pm

Just so you know installing any operating system on removeable storage can be a nightmare. Normally it requires editing config files and such. I thought about install Ubuntu or Windows XP on an 8 gig SD card. After reading how complicated it was I gave up before I even started.
 
UberGerbil
Grand Admiral Gerbil
Posts: 10368
Joined: Thu Jun 19, 2003 3:11 pm

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 6:30 pm

Usacomp2k3 wrote:
Honestly, just install linux in a virtual machine and call it a day.

"Dell ultra-mobile think pad" So is it a dell or an IBM/Lenovo? He probably wouldn't mind a new hard drive, and that wouldn't be that much more than a good CF card.
Well, I think the ultra-mobiles all use 1.8" drives (though I could be wrong) so there isn't the nice "swap in a 7200rpm mobile drive for an instant boost in performance" option.
 
Usacomp2k3
Gerbil God
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 6:32 pm

UberGerbil wrote:
Usacomp2k3 wrote:
"Dell ultra-mobile think pad" So is it a dell or an IBM/Lenovo? He probably wouldn't mind a new hard drive, and that wouldn't be that much more than a good CF card.
Well, I think the ultra-mobiles all use 1.8" drives (though I could be wrong) so there isn't the nice "swap in a 7200rpm mobile drive for an instant boost in performance" option.

Fair point. I had considered that, but figured that would come out when we figure out just what this ultra-portable is. For some reason I saw 'card reader' and though internal, and I've never seen an ultra-portable with an integrated CF reader. However since it's probably external and USB, then yeah.
 
bthylafh
Maximum Gerbil
Posts: 4320
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 6:38 pm

Hakkaa päälle!
i7-8700K|Asus Z-370 Pro|32GB DDR4|Asus Radeon RX-580|Samsung 960 EVO 1TB|1988 Model M||Logitech MX 518 & F310|Samsung C24FG70|Dell 2209WA|ATH-M50x
 
amphibem
Gerbil Elite
Posts: 662
Joined: Sat Apr 24, 2004 5:52 pm
Location: New Zealand
Contact:

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 6:47 pm

I ask this mostly because I would like to run a mythbuntu frontend off a 4GB usb flash drive, what is so complicated? I know when I ran the installer once with my flash drive plugged in it came up as an option as the hard drive to use. Is there more to it than simply selecting it as the desired drive at that stage and running the install as usual?
Phenom II X4 955 BE - 3GB RAM - AMD HD5770 - 640GB WD - Viewsonic 19" - DVDRW - Windows 7
 
Usacomp2k3
Gerbil God
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 6:49 pm

amphibem wrote:
I ask this mostly because I would like to run a mythbuntu frontend off a 4GB usb flash drive, what is so complicated? I know when I ran the installer once with my flash drive plugged in it came up as an option as the hard drive to use. Is there more to it than simply selecting it as the desired drive at that stage and running the install as usual?

Many older motherboards will have issues booting off of a flash drive. Most new computers shouldn't have a problem, but with an OEM machine, I really don't know.
 
bitvector
Grand Gerbil Poohbah
Posts: 3293
Joined: Wed Jun 22, 2005 4:39 pm
Location: San Francisco, CA

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 8:18 pm

amphibem wrote:
I ask this mostly because I would like to run a mythbuntu frontend off a 4GB usb flash drive, what is so complicated? I know when I ran the installer once with my flash drive plugged in it came up as an option as the hard drive to use. Is there more to it than simply selecting it as the desired drive at that stage and running the install as usual?

Many times, no -- there's nothing more to it. It can be that simple, assuming (as Usacomp2k3 pointed out) booting from flash drive is well supported. Some motherboards do weird stuff, and I've had bootable flash drives with syslinux that work perfectly on some motherboards and not on others -- or sometimes you have to change settings from USB HDD to USB Zip drive or USB Floppy Drive. I've done installs on USB flash drives and USB hard drives, and there are generally two things that cause issues, both caused by renumbering of USB devices: 1) /etc/fstab and 2) your boot loader.

/etc/fstab maps physical device/partitions to mount points. The physical device numbering can easily change with removable devices (e.g. one time your removable drive is /dev/sdb and then you plug in some other USB mass storage device and it becomes /dev/sdc). There are a variety of ways to specify entries in /etc/fstab, and it isn't a problem if your fstab uses either filesystem labels or UUIDs (or you use LVM), but depending on which Linux distribution you use, the installer may just set it up with device names. You can change this after the install, though. For instance, on a system I just built I had my /boot entry as "/dev/sda1 /boot ..." and changed it to "LABEL=boot /boot ..." and now I can reorder drives to different SATA ports without any issue (the rest of the mounts use LVM). Your boot loader may also be affected by changes in device order, as it is usually dependent on the BIOS provided ordering of drives. This is part of the reason why you see syslinux for booting USB flash drives more than GRUB (because syslinux is simpler and more robust in these cases), although GRUB works too if you're careful. If you do go with an alternate boot loader like syslinux or lilo, you may have to manually update kernel entries after system updates, too, depending on how you set it up.

As long as you ensure your USB mass storage device ordering doesn't change, you shouldn't run into either of these problems and you can install just like a regular hard drive. If you want a drive that you can plug in to many computers and will still boot, then you'll need to deal with the bootloader issue. It really depends on your intended use. A lot of the guides online are for the type you can plug in anywhere and are therefore more complex.
 
notfred
Maximum Gerbil
Posts: 4610
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Booting linux off of a Compact Flash.

Wed Mar 19, 2008 9:29 pm

I can pretty much guarantee that the CF reader he has is going to USB, that makes it tricky to boot. If he insists on using CF rather than a real hard drive then one trick is to get a CF to IDE adaptor as CF is actually fully compatible with IDE, just a different layout of the pins. This would mean opening up the PC.

Another alternative may be to boot a live CD, Knoppix or Ubuntu and use the ability to store the home directory on a flash device. Performance will be pretty bad as it has to go to CD for everything, but at least it works.
 
Synchromesh
Graphmaster Gerbil
Posts: 1001
Joined: Tue Apr 12, 2005 10:56 am
Location: The Land of Beetles.
Contact:

Re: Booting off of a Compact Flash.

Wed Mar 19, 2008 9:47 pm

UberGerbil wrote:
Usacomp2k3 wrote:
Honestly, just install linux in a virtual machine and call it a day.

"Dell ultra-mobile think pad" So is it a dell or an IBM/Lenovo? He probably wouldn't mind a new hard drive, and that wouldn't be that much more than a good CF card.
Well, I think the ultra-mobiles all use 1.8" drives (though I could be wrong) so there isn't the nice "swap in a 7200rpm mobile drive for an instant boost in performance" option.


Not necessarily. I have 2 ultraportables from IBM - an X31 and X40. The X31 uses standard 2.5in drives. Just like the the rest of the X3x series along with X2x. The newer X6x ultraportables also use standard 2.5in hard disks but with SATA connectors. The only oddity is the X4x series. Those use ridiculous proprietary non-standard 1.8in drives with regular IDE connectors on the side. Those drives are very expensive (paid $70 for my 30GB and it was a real bargain) and slow being only 4200rpm.

Basically the way I got around it is to buy an IDE-to-CF adapter. Some of these support 2 cards like the Addonics model that I bought. This means that the CF card is used instead of hdd. Now, the painful part is that in order to be fairly fast one must buy a speedy primary card. My 300x 8GB Lexar cost me $150 on eBay slightly used (guy claimed 2-3 writes) but one can get a slower or smaller card for less than $100. The second card can be slower cheaper type. So this is what I might suggest to the OP if the laptop gives his buddy trouble booting from SD card slot. There are plenty cheap IDE-to-CF adapters on eBay for just a few dollars but I've read some of them don't work too well so got the more expensive Addonics for $30. Works like a charm so far, just detects the CF card as hdd.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Booting linux off of a Compact Flash.

Thu Mar 20, 2008 12:28 pm

As already noted, whether this is even doable depends on how well your BIOS supports booting from external devices. Assuming the boot support is there, you should be able to install an OS to an external storage device. Recent Linux distros seem to be better at handling this than in the past.

At work we've successfully booted Linux on Compaq laptops using USB flash drives. IIRC all we did was run the normal Linux installer (Fedora Core 6) and specify the USB drive as the installation disk. We also routinely boot Linux on x86-based single-board computers this way.

If you've got enough RAM, using a virtualization product like VMware (as Usacomp already suggested) would also be a good option.
Nostalgia isn't what it used to be.
 
SlyFerret
Graphmaster Gerbil
Posts: 1041
Joined: Thu Feb 28, 2002 7:00 pm
Location: Delaware, Ohio
Contact:

Re: Booting linux off of a Compact Flash.

Thu Apr 03, 2008 9:11 am

If you have a HDD in that machine, that is the MBR that will be used, so your BIOS should be happy with that.

I'm not sure that installing to a flash drive would be a problem at all. The flash drive would have to be in the system for the boot loader to work though (even to boot windows), since the system would load the MBR, and then look to the flash drive for GRUB, or whatever boot loader you are using.

-SF
"Had this been an actual emergency, we would have fled in terror, and you would not have been notified."
 
steelcity_ballin
Gerbilus Supremus
Posts: 12072
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA

Re: Booting linux off of a Compact Flash.

Thu Apr 03, 2008 9:24 am

I thought I read somewhere a while back that CF no longer had a tangible limit to the number of writes, am I just wrong?
 
SlyFerret
Graphmaster Gerbil
Posts: 1041
Joined: Thu Feb 28, 2002 7:00 pm
Location: Delaware, Ohio
Contact:

Re: Booting linux off of a Compact Flash.

Thu Apr 03, 2008 9:26 am

It does, but the write leveling helps out big time.

-SF
"Had this been an actual emergency, we would have fled in terror, and you would not have been notified."
 
notfred
Maximum Gerbil
Posts: 4610
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Booting linux off of a Compact Flash.

Thu Apr 03, 2008 1:26 pm

SlyFerret wrote:
If you have a HDD in that machine, that is the MBR that will be used, so your BIOS should be happy with that.

No, the MBR is from the device specified as the boot device by the BIOS, so if you specify a flash drive then it will need an MBR on it. The MBR on the device then scans the partition table on the device for the partition marked with the boot flag and then jumps to the boot loader on that.

Many flash drives I have dealt with have been missing an MBR, I use the one from syslinux and just copy it in to the first 512 bytes of the device.
 
FroBozz_Inc
Darth Gerbil
Posts: 7363
Joined: Mon Apr 21, 2003 9:35 am
Location: Hockeytown, MI

Re: Booting linux off of a Compact Flash.

Wed Apr 23, 2008 10:25 am

I have a little FreeNAS project underway at home.

Celeron 466 BX motherboard from an old Gateway PC (passive cooling!), Adaptec 2400a PCI IDE RAID5 card, (4) large IDE drives soon, integrated video, 4 old Starcom IDE drive drawers, 3COM PCI NIC...

Just bought a IDE to CF adapter from eBay and (2) 128mb cf cards - for a total of like $11.

I was surprised that there is virtually no components on the adapter board. CF really is just like IDE.

The plan is to boot and run FreeNAS from the CF card, save the profile on a 128MB USB key, and save the data on the RAID5 array. FreeNAS is really cool BTW.
 
radix
Gerbil First Class
Posts: 103
Joined: Sun Jan 13, 2002 7:00 pm
Location: Mountain View, CA
Contact:

Re: Booting linux off of a Compact Flash.

Thu Apr 24, 2008 7:10 pm

Regarding the flash durability, there are several filesystems aimed at them, like jffs2. They are not as fast as the most common options, but they have levelling themselves and other features to improve flash lifetime. There's also the possibility of creating a read-only RAM drive that loads on boot for static data, which should improve not only flash durability, but also performance, as a lot of things would just sit in the main memory waiting to be used.

There are several projects around that help creating you own distro, and also several small distros that fit platforms with restrictions. Some links:

http://www.linuxfromscratch.org/
http://www.uclibc.org/
http://www.busybox.net/
http://sources.redhat.com/jffs2/

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On