Some weeks ago after pacman -Syu my system did not boot at all.
It said something like "modprobe: FATAL: Could not load /lib/modules/.../modules.dep: No such file or directory."
After a hard work of recovery described in the Kernel Panics Arch Wiki and rebooting my system all went fine but upgrading the system again caused the same error.
After some hours of panicking I found the solution here:
https://bbs.archlinux.org/viewtopic.php?id=96794
My /boot partition was not mounted when I upgraded my kernel, so the upgrade process could not copy the appropriate files to this area. Instead it created a separate /boot directory under my mounted root filesystem. The system wanted to boot from the /boot partition but the upgraded kernel was not there.
I propose two solutions (I chose No. 2):
1. If you keep your /boot partition unmounted and you see thet pacman wants to upgrade your kernel then stop the upgrade process, mount your /boot partition and start the upgrade in this state.
2. If you do not want to take care of manual mounting then add a line to your /etc/fstab to mount your /boot partition automatically.
And another suggestion:
Keep an Arch Linux installation medium on a usb stick, it can be very handy to have one at panic time... I wish that you do not need to use it ever though!
Showing posts with label fstab. Show all posts
Showing posts with label fstab. Show all posts
Tuesday, 20 September 2011
Tuesday, 6 September 2011
Partitioning, installation, first settings
OK, let's start blogging! I conclude how I installed Arch Linux, what issues I faced, what things you might need to consider during the installation and setup process.
Partitioning
I have a Lenovo Thinkpad Edge 11 laptop and I decided to deploy Arch Linux on it after my first impressive experiences on my desktop PC with Arch. Although there was a nicely installed recovery partition and an OEM Win7 Professional on my new office notebook I deleted everything and repartitioned its hard drive.
Now my partition table looks like this:
sda1 Primary /boot 256M ext4
sda2 Primary swap 256M swap
sda3 Extended (264G)
sda5 / 24G ext4
sda6 /home 237G ext4
sda4 Primary 33G fat32
I am not sure that using ext4 for my /boot partition was the wisest decision but I do not have any problem with it, I do not see any performance loss due to journaling (i.e. the whole partition is only 256M) and I assume that ext4 is mature enough not to leave any reliability leaks for standard use.
As you can see I reserved some space on the end of the drive to create a dual boot setup if one day it will be necessary but now I have been using my notebook for several months and I have not installed anything on this partition yet. Instead I use a Win7 virtual machine running under Virtualbox for accessing Windows-only applications (MS Office, Nokia PC Suite, Olympus Studio, etc.). Let's talk about it later, now I would like to sum up the installation process:
Installation
I followed the Beginners' Guide and the whole setup procedure went pretty flawlessly. I used a usb stick as installation medium that I have created with dd on another Linux box. I had some minor issues during the installation but nothing serious, I could solve them easily:
/etc/rc.conf
I put my basic settings to /etc/rc.conf as per the Beginners' Guide according to my preferences, no tricks here. The MODULES and DAEMONS sections have changed a lot since I installed some tools. I will publish my actual configuration later.
/etc/fstab
I set up my /etc/fstab to mount my file system at boot time:
tmpfs /tmp tmpfs nodev,nosuid 0 0
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
UUID=0bcacd6c-8824-4961-bdeb-1ac6f3a94e70 swap swap defaults 0 0
UUID=7cca4b59-e71b-4f35-b3de-7eefc813a576 / ext4 defaults 0 1
UUID=c43fcb5b-c9e6-4a5f-8dda-85bda0f1b3c0 /home ext4 defaults 0 2
UUID=ec7151f4-50af-493a-b479-1722e569dd50 /boot ext4 defaults 0 2
I don't know if devpts and shm are needed or not, they are not very well documented, but I left those lines in the fstab that was created automatically during the installation.
I fulfilled the following settings according to the fstab wiki:
I inserted the tmpfs line (see the first row of my /etc/fstab). Now I am trying these symbolic links as they can improve some performance, at least theoretically:
ln -sf /run/lock /var/lock
ln -sf /run /var/run
reboot
I have set the fsck check priority (i.e. the file system check at every x boots) by the last flag of the /etc/fstab: I set my root (/) partition to be checked first (1), my /home and /boot secondly (2), and all the others are left unchecked (0) by fsck. I need to mention here that ext4 is checked extremely fast compared to ext3 so it seems to be a wise decision to use this file system.
You may have noticed that my /boot partition is in my fstab. Usually it is not needed because the files here do not change frequently. Although at a kernel upgrade (by pacman -Syu) your /boot partition needs to be mounted.
Other settings
I did not change anything in /etc/mkinitcpo.conf.
After installation my /etc/hosts file was correctly set up and since I use dhcp I did not need to change /etc/resolf.conf either.
In /etc/locale.gen I activated my Hungarian locales besides the default English ones:
en_US.UTF-8 UTF-8
en_US ISO-8859-1
hu_HU.UTF-8 UTF-8
hu_HU ISO-8859-2
Bootloader settings (/boot/grub/menu.lst):
I installed GRUB as my bootloader with these settings in my /boot/grub/menu.lst:
timeout 1
default 0
# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/7cca4b59-e71b-4f35-b3de-7eefc813a576 ro
initrd /initramfs-linux.img
# (1) Arch Linux
title Arch Linux Fallback
root (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/7cca4b59-e71b-4f35-b3de-7eefc813a576 ro
initrd /initramfs-linux-fallback.img
Please note that since kernel 3.0 the .img and kernel names have changed. On the new installation media of 2011.08.19 this will not be an issue any more. If you upgraded your kernel from the older (kernel26) version like me, you can find symlinks to the new files under /boot so your older version of menu.lst will still work. I changed these entries in my menu.lst in order to avoid the symlinks and using the real filenames instead as you can see in my menu.lst file.
Partitioning
I have a Lenovo Thinkpad Edge 11 laptop and I decided to deploy Arch Linux on it after my first impressive experiences on my desktop PC with Arch. Although there was a nicely installed recovery partition and an OEM Win7 Professional on my new office notebook I deleted everything and repartitioned its hard drive.
Now my partition table looks like this:
sda1 Primary /boot 256M ext4
sda2 Primary swap 256M swap
sda3 Extended (264G)
sda5 / 24G ext4
sda6 /home 237G ext4
sda4 Primary 33G fat32
I am not sure that using ext4 for my /boot partition was the wisest decision but I do not have any problem with it, I do not see any performance loss due to journaling (i.e. the whole partition is only 256M) and I assume that ext4 is mature enough not to leave any reliability leaks for standard use.
As you can see I reserved some space on the end of the drive to create a dual boot setup if one day it will be necessary but now I have been using my notebook for several months and I have not installed anything on this partition yet. Instead I use a Win7 virtual machine running under Virtualbox for accessing Windows-only applications (MS Office, Nokia PC Suite, Olympus Studio, etc.). Let's talk about it later, now I would like to sum up the installation process:
Installation
I followed the Beginners' Guide and the whole setup procedure went pretty flawlessly. I used a usb stick as installation medium that I have created with dd on another Linux box. I had some minor issues during the installation but nothing serious, I could solve them easily:
- Somehow the built-in partition manager (parted?) of the installation medium could not create the extended partitions I needed so I used the old and reliable fdisk command to create my partition table. During the installation process I only had to assign the mount points for my pre-created partitions.
- As I remember well the wlan interface did not work during installation so I used eth0 and I set up the wireless networking after installation.
/etc/rc.conf
I put my basic settings to /etc/rc.conf as per the Beginners' Guide according to my preferences, no tricks here. The MODULES and DAEMONS sections have changed a lot since I installed some tools. I will publish my actual configuration later.
/etc/fstab
I set up my /etc/fstab to mount my file system at boot time:
tmpfs /tmp tmpfs nodev,nosuid 0 0
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
UUID=0bcacd6c-8824-4961-bdeb-1ac6f3a94e70 swap swap defaults 0 0
UUID=7cca4b59-e71b-4f35-b3de-7eefc813a576 / ext4 defaults 0 1
UUID=c43fcb5b-c9e6-4a5f-8dda-85bda0f1b3c0 /home ext4 defaults 0 2
UUID=ec7151f4-50af-493a-b479-1722e569dd50 /boot ext4 defaults 0 2
I don't know if devpts and shm are needed or not, they are not very well documented, but I left those lines in the fstab that was created automatically during the installation.
I fulfilled the following settings according to the fstab wiki:
I inserted the tmpfs line (see the first row of my /etc/fstab). Now I am trying these symbolic links as they can improve some performance, at least theoretically:
ln -sf /run/lock /var/lock
ln -sf /run /var/run
reboot
I have set the fsck check priority (i.e. the file system check at every x boots) by the last flag of the /etc/fstab: I set my root (/) partition to be checked first (1), my /home and /boot secondly (2), and all the others are left unchecked (0) by fsck. I need to mention here that ext4 is checked extremely fast compared to ext3 so it seems to be a wise decision to use this file system.
You may have noticed that my /boot partition is in my fstab. Usually it is not needed because the files here do not change frequently. Although at a kernel upgrade (by pacman -Syu) your /boot partition needs to be mounted.
Other settings
I did not change anything in /etc/mkinitcpo.conf.
After installation my /etc/hosts file was correctly set up and since I use dhcp I did not need to change /etc/resolf.conf either.
In /etc/locale.gen I activated my Hungarian locales besides the default English ones:
en_US.UTF-8 UTF-8
en_US ISO-8859-1
hu_HU.UTF-8 UTF-8
hu_HU ISO-8859-2
Bootloader settings (/boot/grub/menu.lst):
I installed GRUB as my bootloader with these settings in my /boot/grub/menu.lst:
timeout 1
default 0
# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/7cca4b59-e71b-4f35-b3de-7eefc813a576 ro
initrd /initramfs-linux.img
# (1) Arch Linux
title Arch Linux Fallback
root (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/7cca4b59-e71b-4f35-b3de-7eefc813a576 ro
initrd /initramfs-linux-fallback.img
Please note that since kernel 3.0 the .img and kernel names have changed. On the new installation media of 2011.08.19 this will not be an issue any more. If you upgraded your kernel from the older (kernel26) version like me, you can find symlinks to the new files under /boot so your older version of menu.lst will still work. I changed these entries in my menu.lst in order to avoid the symlinks and using the real filenames instead as you can see in my menu.lst file.
Subscribe to:
Posts (Atom)