You are not logged in.
@ other posters. Please keep this post OT! If you are in a position to suggest valid comments or additional items regarding the problems resulting from inappropriate installations of alternative distros, please comment.
@Ant
There have been many posts about the need for caution when installing alternative Linux distributions.
Unfortunately the cautionary posts vanish in the deluge of posts occurring due to the general excitement about this product.
Please would you and some of the linux experts agree a sensible warning and make it sticky, for potential distro installers along the lines of the following:-
""The EEE-PC has a Asus designed and implemented solid state disk, not an industry standard plug-in unit. It uses flash ram and has a finite number of write cycles. Even with the SSD controller's inbuilt wear levelling, an incorrect Linux installation will drastically reduce the life of the drive. (or even cause the SSD to reduce in usable size very quickly). The flash I.C's are permanently soldered in and are not user replaceable.
To maximise the life of this disk, the following points should be followed when installing an alternative distribution:-
1. Never choose to use a journaling file system on the SSD partitions
2. Never use a swap partition on the SSD
3. Always edit your new installation fstab to mount the SSD partitions "noatime"
4. Never log messages or error log to the SSD
Do NOT assume that an automatic install of any distro will perform the above features. The solid state disk looks like an ATA drive to the installer sniffer, it knows nothing about SSD's! ""
Feel free to edit or add any other gotchas
regards
Patrick
(12 more days!)
Offline
Well, this is good info, and we need to expand it or be more detailed when possible.
For new people to linux.
1. Not choosing a journalising file system means that when the installer of whatever linux distro (Ubuntu, Fedora, whatever) asks you for file system, you should choose something like ext2. Ext2 would be highly recommended in this situation.
2. When the installer asks you if you want it to setup partitions for you, say no, and just create a data partition to mount "/", and don't create a swap partition.
3. I don't remember where fstab is (I think it is under /etc/ but if it isn't please someone correct this).
4. I have no clue (sorry, never really use those, I have used linux for a long time, but only as a desktop user) of how to setup the system for it not to log errors... Can someone explain this? Once this is all done, we could add this to the wiki :-)
Offline
rozojc wrote:
3. I don't remember where fstab is (I think it is under /etc/ but if it isn't please someone correct this).
Yep, normally /etc/fstab
rozojc wrote:
4. I have no clue (sorry, never really use those, I have used linux for a long time, but only as a desktop user) of how to setup the system for it not to log errors... Can someone explain this? Once this is all done, we could add this to the wiki :-)
Logging is usually in /var/log/messages - don't know if this is true for eee pc
Offline
How come no swap, most distros will not let you install without one. Will they?
Offline
Well, no swap because swap file is constantly being written. When you have a solid state drive like the one of the EEE, writing all the time can reduce (considerably) the life span of the hard drive, so it-s better not to have a swap partition.
Some distros let you install without a swap, some don't. Usually, as long as you have an option for "Advanced settings" when installing, you should be able to do it...
Offline
Even if they don't let you install without swap, you can always turn it off afterwards.
Offline
How come SSD can not have read write, read wite going on the whole time? RAM manages with in is it not kind of the same thing?
Offline
Because SSD uses flash mem, which (short, technically incorrect but "you get the idea" answer) because of the way it saves information, it wears down each time it writes something. Flash has (depending on quality) from 10,000 write cycles (meaning you can write the entire memory 10,000 times) and up. If you have swap, you will be writing all the time, and thus you will be wearing your SSD much faster. Actually, the Xandros version that the EEE uses comes without swap.
Same goes for journaling filesystems, they write more often, so that's why it is suggested not to use it.
Offline
Won't windoes use a pager file though or is there a way to turn this off? And does this not just mean that in a couple of years time loads of eee PCs are going to be dead with no what of replacing the drive.
Offline
Yes, windows will do that. I haven't used Windows in a long time, but I think that under system settings you could turn off the pager file (which would have the same bad effect as the linux swap on the SSD). And yes, it means exactly that. The lifespan of an EEE will be lower. This has already been discussed in the forums several times (I actually opened a thread a long time ago wondering whether the SSD would be repleceable).
For the moment, you can safely assume that under normal usage it should last at least 3 years, and if it does die, you can always put an SD card and use it instead... But yes, the fact is that SSDs lifespan is way shorter than that of regular notebooks...
Offline
3 years isn't the longest of times for a laptop.
Is it assumed that the default OS is configured to look after the flash based storage better than other distro's or just an assumption?
Is it fact that the default OS doesn't have a swap partition?
Aren't hardware units such as mobile phones, Palm tops and SD cards also flash based? They last longer than 3 years.
Offline
Well, 3 years is not much, I agree... that's why I had opened a thread regarding that topic a long time ago... But there's no way around it really, it's a hardware issue... SSDs are that way, and we have to live with that. Although on the rational side, it is true that three years from now we will all probably have changed the EEE for whatever replaces it in the near future...
To answer your other questions:
1. Yes, the Default Xandros is configured in a way that it will help maintain the flash drive longer. For example, it comes using the ext2 filesystem which has no journalising, so it makes less writes to the drive.
2. Yes, it is a fact that it has no swap. Not sure where I read that, but somebody posted the contents of the fstab file, which showed no swap partition.
3. Not all hardware units use flash. They do last longer than 3 years, but because you make much less writes in those systems that in a hard drive with a full OS. Think about it, you are not constantly adding and adding contacts to your cell phone, nor adding, deleting and then adding and adding each day more games, etc... You pretty much add things every once in a while, and there comes a point where you pretty much don't add new things. Flash devices wear down as you write. You can read as many times as you want.
Offline
But how does RAM get around this? And I am sure the £600 SSD last more than 3 years?
Offline
OK.... we kind of went OT... please keep replies to suggestions. Questions can be answered by linux gurus in a different thread. This thread is designed to be a list of warnings and considerations... please keep it that way. WINDOWS queries do not belong in a Linux thread!
[/OT]
Mounting /var/log/ as a tmpfs will reduce the amount of writes used by logging, however it is highly advised that you modify the shutdown scripts to copy the logs to a safe before turning off, so you don't lose them permanently (they are useful!!!). There is no generic way to do this as different systems use different init daemons... but it would be best to start looking at /etc/inittab and see what script is called for shutdown. That should give you an idea of where to put the extra commands. (NOTE: If you upgrade systems, i.e. upgrading Ubuntu Feisty -> Gutsy, your changes will most likely not survive... you will need to make them again after the upgrade is complete)
As of writing the Atheros driver supplied with the Xandros OS is a closed-source binary-blob driver. This means that it will probably not work with kernels of different versions... and may not even run with kernels of the same version. Unfortunately there is not open-source native driver for linux (although madwifi is awfully close to a solution for the ar5007eg). Instead you will require ndiswrapper and a copy of the original XP driver for this card. ndiswrapper is usually available in the Distributions software package repositories and the XP driver can be procured from the Asus support website, or the restore DVD that came with the Eee.
*** Patrick, can you add these points to the original post. Thanks.
Offline
timbosteve, could you write down how to mount /var/log as tmpfs as a default option for when you boot the computer?
Offline
Add this line to /etc/fstab
tmpfs /var/log tmpfs defaults 0 0
As for "where" to place the copy-replace-logs modifications... my guess would be something like the following
Create the startup/shutdown script for backing up the logs (create a new file using "sudo nano /etc/init.d/logbak
#!/bin/bash
case "$1" in
stop)
mv -Rp /var/log/* /backup_logs/
;;
start)
mv -Rp /backup_logs/* /var/log/
;;
*)
echo 'Usage: /etc/init.d/console-setup {start||stop}'
exit 1
;;
esacNow create /backup_logs
sudo mkdir /backup_logs
Now put the scripts in the right places
ln -s /etc/init.d/logbak /etc/rcS.d/S02logbak.sh ln -s /etc/init.d/logbak /etc/rc0.d/S02logbak.sh
Ben, if you read this can you decipher it with your Debian genius and tell me if it is correct? Thanks.
Offline
timbobsteve wrote:
Add this line to /etc/fstab
Code:
#!/bin/bash case "$1" in stop) mv -Rp /var/log/* /backup_logs/ ;; start) mv -Rp /backup_logs/* /var/log/ ;; *) echo 'Usage: /etc/init.d/console-setup {start||stop}' exit 1 ;; esac
Surely that should be:
echo 'Usage: /etc/init.d/logbak {start||stop}'Offline
One thing to keep in mind is that to Linux, there is no difference between a hard drive (or SSD in this case) and a USB pen drive. Both appear as block devices.
You could, get a cheap, disposable pen drive. Drop 2 partitions on it. Format one as swap and one as ext2 add the appropriate lines to fstab.
Such as:
/dev/sda1 swap defaults 0 0
/dev/sda2 /var/log ext2 defaults 0 0
Obviously pulling the pen drive out whilst the laptop is still going would cause a kernel panic and kill it dead; but if you must have swap/logging it's viable. Messy, but viable.
Offline
danscott wrote:
timbobsteve wrote:
Add this line to /etc/fstab
Code:
#!/bin/bash case "$1" in stop) mv -Rp /var/log/* /backup_logs/ ;; start) mv -Rp /backup_logs/* /var/log/ ;; *) echo 'Usage: /etc/init.d/console-setup {start||stop}' exit 1 ;; esacSurely that should be:
Code:
echo 'Usage: /etc/init.d/logbak {start||stop}'
Hehehehe.... I'll give you two guesses where I got the init file template from
![]()
Offline
Hey I've got an Idea I wanted to use both linux and windows. so I've been thinking about this and there really isn't enough room to install a dual boot by any means. so what I've concluded is that I will get two SD cards and install my OS's to the SD cards then on the SSD memory keep my data. so I can switch from windows to linux with a quick reboot. and the data that I'm working on stays on the computer in the SSD memory. But I haven't tried this yet. its all speculation. SD cards are cheep if they die after three years I could care less.
Last edited by whitespace (2007-11-03 7:01:06 pm)
Offline
bfbf wrote:
But how does RAM get around this? And I am sure the £600 SSD last more than 3 years?
Simply put, RAM is not Flash. RAM does not hold it's contents when power is removed. Flash is simply a solid state transisterized storage technology and that's about as close to RAM as it is. RAM is a different beast entirely.
http://en.wikipedia.org/wiki/Flash_memory
http://en.wikipedia.org/wiki/Flash_memory#Limitations
http://en.wikipedia.org/wiki/RAM
Heading off topic a bit, but it should be apropo.
Offline
One thing not mentioned here is that you can setup a swap file on Linux, rather than a swap partition. This is actually a piece of cake. Create an empty file of appropriate size using dd and then use the swapon command to utilise it.
So it should be possible to create a script that did this on each boot up (first deleting the old swap file, of course). This way the swap file would never be in the same position on the disk (ie it wouldn't be a permanent file hammered by the OS), which I believe is the thing people here are worried about.
My experience is that the swap file rarely gets written to anyway if you're sensible with your usage and don't have more than 1/2 apps working at the same time.
Last edited by rs-px (2007-11-07 7:50:23 am)
Offline
First, with wear-leveling logic in flash drives (Eee uses a compact flash chip to control the actual flash chips) means that creating a swap file in a different place probably won't be any better than using a swap partition. This causes metadata writes anyway when the thing gets updated. It should be disabled completely.
Second, I don't think there's much point to disabling journaling if there's wear-leveling going on. Reducing writes altogether will reduce journal writes accordingly. Ext2 is easy to corrupt on unplanned shutdowns, and unplanned shutdowns are easy on laptops. If you set noatime, disable swap, log to tmpfs or disable logging, disable browser cache, etc, then most disk activity will be when you initiate it (eg click "save"), and that'll be orders of magnitude better than a stock Windows install. If Asus is even remotely willing to support Windows on these things, that should be fine.
Offline
Disabling any kind of caching (or certainly cutting down on it) should be the first port of call.
What programs other than browsers are likely to maintain a cache?
Offline
I submit that using a "Live Flash Drive" boot with very large swap will work very well on any system since the swap provided can be maintained for years and the "Live" system is r/o. (Consider FaunOS as a candidate and use 4GB of USB flash with 1.5GB of swap or even go to 8GB, drive!!). The onboard flash is not impacted, all operations needing swap are on the flash drive, r/o.
In save session, the flash is written to, granted. With 500 packages in the r/o category, only video operations would seem to need swap...the more the better. This is contrary to conventional thought about swap......
The items swapped are "least used" as a primary starting point. This protocol applies at each boot or swap call.
I agree, no swap in the internal flash unit, only large sized external USB drives with swap.....
Offline