LMDE 201303 RC with buffer i/o errors - SSD issues

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read this

LMDE 201303 RC with buffer i/o errors - SSD issues

Postby plaus on Thu Mar 21, 2013 8:29 pm

Hello,
I've installed LMDE 201303RC with LVM and crypto following this guide: http://forum.linuxmint.com/viewtopic.php?f=197&p=623910

Took me quite a while to get it all right but in the end it worked out. I've used some of the pointers posted last and they fixed most of the issues the guide had.

However, now the system is hardly running stable, after 15 minutes it generally starts to choke.
Certain applications close and then I can't execute any commands in terminal anymore - it says basic i/o error. When I do ctrlaltf9 I could see "buffer i/o error on device dm-3.." / "startpar: service(s) returned failure: plymouth"
Other times it just goes wild by opening a unicorns of the same windows..filling up my taskbar. Only way out is to reboot..so this is hardly convenient.

The laptop I am using is an Asus Zenbook UX32VD. It is UEFI but it should be able to boot from legacy BIOS too, so I doubt this is making the issue.
I made some extra tweaks for SSDs on top of the guide so perhaps that's what's going wrong: kernel scheduler is deadline and this is my /etc/fstab:
UUID=25d974f2-5128-4221-8a65-890431098378 /boot ext2 defaults 0 2
UUID=0fd4e85a-cd5a-476f-8ba6-b1fd914e68f3 / ext4 noatime,nodiratime,discard,errors=remount-ro 0 1
UUID=87ff9602-884f-4b6f-a452-eba22fb00720 /home ext4 noatime,nodiratime,discard 0 2
UUID=21748299-9796-4896-82ee-79b24838ba0b none swap sw 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0

This is how I did the installation, might be helpful for everyone here up till the SSD tweaks:

Gparted format ext2 boot
unformatted lvm partition
apt-get install lvm2 squashfs-tools
cryptsetup -c serpent-xts-plain64 -s 512 -y luksFormat /dev/sda1
cryptsetup luksOpen /dev/sda1 sda1_crypt
VOLUME=/dev/mapper/sda1_crypt
pvcreate $VOLUME
vgcreate volumes $VOLUME
lvcreate -n root -L 40G volumes -Z n
lvcreate -n swap -L 10240M volumes -Z n
lvcreate -n home -L 100%FREE volumes
lvs
mkswap -L swap /dev/mapper/volumes-swap
swapon /dev/mapper/volumes-swap
mkfs -t ext2 -L boot /dev/sda3
mkfs -t ext4 -L root -j /dev/mapper/volumes-root
mkfs -t ext4 -L home -j /dev/mapper/volumes-home
mount /dev/mapper/volumes-root /mnt
mkdir /mnt/boot /mnt/home
mount /dev/sda3 /mnt/boot
mount /dev/mapper/volumes-home /mnt/home
unsquashfs -f -d /mnt /live/image/casper/filesystem.squashfs
blkid
nano /mnt/etc/fstab
UUID=25d974f2-5128-4221-8a65-890431098378 /boot ext2 defaults 0 2
UUID=0fd4e85a-cd5a-476f-8ba6-b1fd914e68f3 / ext4 noatime,nodiratime,discard,errors=remount-ro 0 1
UUID=87ff9602-884f-4b6f-a452-eba22fb00720 /home ext4 noatime,nodiratime,discard,nodev,nosuid 0 2
UUID=21748299-9796-4896-82ee-79b24838ba0b none swap sw 0 0

/mnt/etc/crypttab
sda1_crypt /dev/sda1 none luks

mount -o bind /proc /mnt/proc
mount -o bind /dev /mnt/dev
mount -o bind /dev/pts /mnt/dev/pts
mount -o bind /sys /mnt/sys
cp /etc/resolv.conf /mnt/etc/
chroot /mnt /bin/bash
export PS1="CHROOT# "
chmod 777 /etc/resolv.conf
nano /etc/resolv.conf

apt-get purge ^live-*
apt-get update && apt-get upgrade && apt-get dist-upgrade
apt-get install lvm2 cryptsetup

tzselect
dpkg-reconfigure keyboard-configuration
dpkg-reconfigure console-setup
dpkg-reconfigure locales
dpkg-reconfigure tzdata
dpkg-reconfigure keyboard-configuration

grub-install /dev/sda
update-grub

deluser --remove-home mint
adduser cryptoid
addgroup cryptoid sudo
passwd root
nano /etc/mdm/mdm.conf
AutomaticLoginEnable=false

umount /dev/pts
umount /proc
umount /sys
exit #exits chroot
umount /mnt/dev
umount /mnt/home
umount /mnt/boot
umount /mnt
sync # write all changes to disk


nano /boot/grub/grub.cfg
reboot

SSD pimping:
scheduler:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=deadline"
update-grub2'.

/etc/fstab/

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0

tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0

tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0

Liquorix:
nano /etc/apt/sources.list
deb http://liquorix.net/debian sid main

All packages in the liquorix repository are signed. Run the command below to install all the keyring packages for liquorix.net.

apt-get install '^liquorix-([^-]+-)?keyring.?'

So I am using the latest liquorix kernel.

I have later found out that you need to make extra changes if you want to use TRIM with an encrypted SSD/LVM:

nano /etc/default/grub
GRUB_CMDLINE_LINUX="allow-discards root_trim=yes"

update-grub


nano /etc/crypttab
#<target name> <source device> <key file> <options>
sda1_crypt UUID=45b4eed0-6d2b-431f-8c10-67a86ea4a02e none luks,discard

update-initramfs -u -k all

as seen here: http://www.webupd8.org/2013/01/enable-t ... rives.html

On debian wiki I have discovered that lvm.conf should be edited to allow for discard flag too:

nano /etc/lvm/lvm.conf
edit this: issue_discards=1

http://wiki.debian.org/SSDOptimization? ... timization



I was hoping the tweaks for encrypted trimming would solve the issue but it still crashes. I have checked free diskspace while running plenty of stuff in cache and my /tmp doesn't seem to get very full.

Can someone help me to fix this problem? Hoping it can be resolved somehow...I would rather fix this install than start all over again..need to know what went wrong first..otherwise I might just dive into btrfs :)
plaus
Level 1
Level 1
 
Posts: 2
Joined: Thu Mar 21, 2013 8:13 pm

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 4 guests