You are not logged in.

#1 2015-05-02 06:54:11

richcocoa
Member
From: India
Registered: 2013-05-31
Posts: 21

[SOLVED] Arch won't boot after I created a separate /var parition

Arch won't boot after I created a separate /var parition on an existing installation.And let me confess: it was maybe stupid trying to do it on an existing install.

I edited the fstab correctly, copied the files using rsync preserving permissions. Then I kept a backup of /var using tar. Then went on to delete everything under /var, ie /var/*, the /var folder is still there. All this I did from a live CD. After that I booted into my arch linux. Here I get messages about systemd successfully finishing fsck on each of my partitions, then the screen starts blinking. And there is no more output. Pressing Ctrl+Alt+Delete causes systemd to stop its services and reboot.

Having realized I had borked my system, I removed the /var line from fstab and restored /var from the tar file I made earlier. Again I did this from a live cd. Rebooted into my arch system, and again similar issues, namely that after fsck and messages informing a few services had started, the screen keeps blinking.

The live cd I used for reorganizing my partitions was elementary OS freya. They have GParted in there. I also have an arch install iso lying aroung from May 2013. If necessary, I can download the latest version. I am currently typing from a Windows installation I dual boot from.


I don't know how to extract any boot logs as I am locked out of the system. Here is my fstab in any case:

# Filesystem information

# /dev/sda5 LABEL=fs_root
UUID=b9d739cf-fd8c-46dd-a919-bd827dc47c66	/         	ext4      	rw,noatime,data=ordered	0 1

# /dev/sda9 LABEL=fs_var
UUID=ec0f7a49-dccd-43ab-8651-9aa3fdb41cc7	/var		ext4		rw,noatime,data=ordered	0 2

# /dev/sda2 LABEL=fs_boot
UUID=0e8ab31a-3bda-4b85-a901-a36f21b1583d	/boot     	ext2      	rw,noatime	0 2

# /dev/sda6 LABEL=fs_home
UUID=d9e63c47-274e-447f-ad01-0d97afe0fd34	/home     	ext4      	rw,noatime,data=ordered	0 2

# /dev/sda7 LABEL=fs_swap
UUID=7301227c-e9f3-41b8-9d0f-4cf3c159491c	none      	swap      	defaults  	0 0

# /dev/sda3 LABEL=fs_win
UUID=12B639D1B639B5D7                     /fs_win   	ntfs      	uid=1000,gid=1000,dmask=027,fmask=137,showexec,nofail,noauto,x-systemd.automount	0 0

# /dev/sda3 LABEL=fs_share
UUID=D272269772268079                     /fs_share 	ntfs      	uid=1000,gid=1000,dmask=027,fmask=137,showexec,noauto,nofail,x-systemd.automount	0 0

I would greatly appreciate any help.

Last edited by richcocoa (2015-05-03 18:04:44)

Offline

#2 2015-05-02 07:07:47

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: [SOLVED] Arch won't boot after I created a separate /var parition

you have the /var mountpoint commented out. remove the leading #


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#3 2015-05-02 07:16:01

richcocoa
Member
From: India
Registered: 2013-05-31
Posts: 21

Re: [SOLVED] Arch won't boot after I created a separate /var parition

Roken wrote:

you have the /var mountpoint commented out. remove the leading #

I commented it out after the system stopped booting with a separate /var mount point. It does not work either way.

Last edited by richcocoa (2015-05-02 07:16:19)

Offline

#4 2015-05-02 07:46:22

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Arch won't boot after I created a separate /var parition

Have you moved everything from /var to /new_var (i named it for learning purpose)? You shoud copy content from /var but not on the fly but booting from arch iso cd, and than you shoud mount your / into arch-chroot environement, mount all of your mount points and than copy content from default /var to new /var. The copying should be done with this

 cp -rax

and you can add -v switch to verbose output. I have my own /var moved the same way.


The simples way is:

-boot the arch iso cd
-mount all of your mount point (i created here in this step /new_var to move /var to a new place, and this /new_var i put in /etc/fstab as /var later)
-copy /var to /new_var with -rax or -vrax (recursive, archive, this filesystem or verbose, recursive, archive, this filesystem switches)
-umount all of it
-reboot.

Last edited by firekage (2015-05-02 07:49:20)

Offline

#5 2015-05-02 08:04:39

richcocoa
Member
From: India
Registered: 2013-05-31
Posts: 21

Re: [SOLVED] Arch won't boot after I created a separate /var parition

firekage wrote:

-boot the arch iso cd
-mount all of your mount point (i created here in this step /new_var to move /var to a new place, and this /new_var i put in /etc/fstab as /var later)
-copy /var to /new_var with -rax or -vrax (recursive, archive, this filesystem or verbose, recursive, archive, this filesystem switches)
-umount all of it
-reboot.

@firekage, I did exactly as you did, except that I used rsync, and I made sure to preseve permissions and (hard,symbolic) links. Something is going wrong. How can I debug this? Can I boot using the arch iso, chroot somehow into my install, and view boot logs?

Offline

#6 2015-05-02 10:24:49

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [SOLVED] Arch won't boot after I created a separate /var parition

I wouldn't use an iso from 2 years ago; get a new one and then use that to boot.
You can then use arch-chroot to get into your existing install and then journalctl -b to view logs from previous boots

Offline

#7 2015-05-03 18:04:13

richcocoa
Member
From: India
Registered: 2013-05-31
Posts: 21

Re: [SOLVED] Arch won't boot after I created a separate /var parition

Here's what had happened: some strange problem with /var/lib/lightdm directory. What I did was booted into an arch iso, chrooted, uninstalled lightdm, removed /var/lightdm, reinstalled it, and everything was working fine again. Thanks to everyone who replied.

And for finding out what went wrong do 'journalctl -b' once you have chrooted into your install from an arch iso. It should give you information about your last boot. From there look for errors. Then if you locate an offending unit, do 'journalctl -u <unit name>' to view information about the unit. Its output is paged, so start checking from the bottom for the more recent entries. All this is documented on the arch wiki page on systemd

Marking this thread as solved

Offline

Board footer

Powered by FluxBB