Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would like to substitute a normal hard disk in an embedded Linux box (using a modified version of BLFS) which is perfectly operating with his SATA HDD, with an SSD, but I have never worked before now with SSDs.
I chose a 8 GB Transcend IDE flash module (TS8GDOM40V-S)
I partioned the SSD with fdisk and created two partitions, one of about 6 GB for root and one with the remaing space for swap.
This system does not operate at all, and now after many researches I know the problem is the alignment of the partition boundaries with the erasable segments of the SSD.
I did a research on the the but I am confused.
What I understood is that – for a correct operation and also for reasons of durability an speed - I have to align the partion boundaries to the erasable segments, but Linux requires a cylinder-based alignment and it is based on a logical geometry with 255 heads, 63 tracks, and 512 bytes/track. This logical geometry would require block size of 255 x 63 x 512 = 8225280 bytes.
I don't know the size of the erasable segments for my Transcend flash module, so I am forced to accep the value of 1048576 bytes (1 MiB).
The two aforesaid values are not compatible, between them and with an SSD with a size of a 8 GB.
I partioned the SSD with fdisk and created two partitions, one of about 6 GB for root and one with the remaing space for swap.
This system does not operate at all, and now after many researches I know the problem is the alignment of the partition boundaries with the erasable segments of the SSD...
What I understood is that – for a correct operation and also for reasons of durability an speed - I have to align the partion boundaries to the erasable segments, but Linux requires a cylinder-based alignment and it is based on a logical geometry with 255 heads, 63 tracks, and 512 bytes/track.
Your device is organised as:
Code:
C H S
TS8GDOM40V-S 8GB 15538 16 63
(...all that series are organised that way, it is just the cylinder number that varies to give the changed capacity)
However, I am pretty sure that alignment is not your problem. If you get this wrong, there will be excess wear in the flash device, potentially leading to premature failure, and there may be a slowdown, but the system should still boot.
Last edited by salasi; 02-16-2011 at 07:48 PM.
Reason: code tags added to align columns
Solid-state drives and all other flash and EEPROM memory suffer from write failure. The technology improves with time, but flash media may begin to show failures with a million or fewer writes. A million sounds like a big number, but the operating system that is swapping may be writing to swap thousands of times per minute. Other uses of the drive experience substantially fewer writes and are not likely to run up against the write wear problem. SSDs use internal wear leveling algorithms to distribute writes throughout the medium by remapping the physical location of logical sectors to extend medium life. The SSD also remaps the physical sectors to exclude sectors that fail due to write damage.
Reading from SSD and other flash memory does not degrade the media.
Write wear is not a problem with magnetic media. There is no limit to the number of times you can write to a particular location on a magnetic hard drive. Actually, there is a slightly higher probability of failure in a location in a hard drive that gets written very frequently because it increases the probability that a head crash, if it happens, will happen in a cylinder where the head spends more time. I have seem many more hard drive deaths due to spindle bearing failure than from head crashes. I have seen a few head crashes as well.
I install a lot of RAM in a computer with SSD. My little netbook has 1GB, which is as much as it can support. Other notebooks typically support 2GB or 4GB or more, though you need a 64-bit processor to access more than 4GB. When I run out of RAM my netbook thrashes and sometimes crashes, but that rarely happens. I simply reboot and the autosave usually has preserved most of my work. Autosave happens only every few minutes, not thousands of time per minute. I also only happens on while I am writing a document, not while compiling or accessing a database.
If I want to add swap to a computer with SSD, I use a USB pocket drive with a swap partition. An obsolete 20GB notebook drive in a USB case would be overkill for swap space. I allocated a few GB on my 250GB backup drive as swap space. I seldom connect the drive for the purpose of using the swap. My real machines (i.e., the desktop machines) have spinning disk or disks with a swap partition on each drive. I nearly never see any swap usage on those machines. I guess I don't really do anything fast enough or massive enough to need swap.
Having no swap space may prevent suspend/restore and hibernate functions, but in theory it is possible to provide these functions by dedicating disk space to those functions. On the other hand, if you have enough RAM that the machine never uses swap for any other purpose, then you could make a swap partition that is really only used for suspend or hibernate.
I do not feel any need for suspend or hibernate because my netbook with SSD can boot to a login prompt in about thirty seconds. Optimized versions of Linux may be able to boot within a few seconds. SSD reads are very fast except for some slow cheap drives like the one that came stock in my netbook. I replaced the stock drive with a larger and much faster device.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.