Gentoo Archives: gentoo-user

From: John Runyon <me@×××.im>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Unknown problem causing incorrect mounting and daemons not starting
Date: Fri, 11 Dec 2015 19:47:01
Message-Id: x8uaql56rovsppbqnf4h3u8r.1449863157892@email.android.com
1 It seems to me the root of your problems is fsck failing because (it thinks) the partitions are already mounted.
2
3 Is your mtab a symlink to /proc/mounts as it "should" be?
4
5 Thomas Sigurdsen <thomas.sigurdsen@×××××.com> wrote:
6
7 >-----BEGIN PGP SIGNED MESSAGE-----
8 >Hash: SHA256
9 >
10 >There is an html version of this mail, that also has emerge --info and
11 >my kernel config, at:
12 >http://browniehive.net/tmp/hp-problems.html
13 >
14 >I've come to a dead end in troubleshooting this issue and turn to you
15 >for help in how to continue. The following is what I've discovered
16 >during troubleshooting.
17 >
18 ># FS's not Mounted After Boot
19 >
20 >After login I need to remount `/` with rw. I always then mount `/boot`,
21 >`/mnt/hdd`, `/home/thomas/hdd` manually; that is --- with the `fixmnt`
22 >script I made pasted below.
23 >
24 >before doing the above `mount` command tells me that the FS's are
25 >mounted as they should be, but they contain no files.
26 >
27 >## `~/bin/fixmnt`
28 >
29 >~~~~~~~~~~~~
30 >#!/bin/bash
31 >
32 >sudo ip link set lo up
33 >sudo dhclient enp0s25
34 >
35 >cp /etc/mtab /home/thomas/mtab-$(date -Iminutes)
36 >wgp=$(wgetpaste /etc/mtab)
37 >
38 >sudo mount -o remount,rw /
39 >echo $wgp >> /home/thomas/wgp-$(date -Iminutes)
40 >sudo mount /boot
41 >sudo mount /mnt/hdd
42 >sudo mount /home/thomas/hdd
43 >sudo swapon /dev/sdb2
44 >#ip link set lo up
45 >#sudo ip link set lo up
46 >~~~~~~~~~~~~
47 >
48 >As I can't put a copy of `/etc/mtab` anywhere on a read only FS you
49 >won't see what it looks like before running the `fixmnt ` script. The
50 >script gives off an error for the call to cp that I've just ignored for
51 >now (also the wgetpaste doesn't work as it requires creating files in
52 >`/tmp/`, which at that point in time is not writable).
53 >
54 ># Daemons Won't Start
55 >
56 >You can see from the above that `net.lo` does not get started and there
57 >are some daemons that haven't started and won't start when called. Some
58 >I can start through calling their commands directly (I do this with
59 >`privoxy` and `tor` at the moment in a `tmux` session for browsing).
60 >Other daemons won't start no matter what I try, like `dbus`.
61 >
62 >## `/etc/init.d/dbus start`
63 >
64 >~~~~~~~~~~~~
65 >* Checking local filesystems .../dev/sda1 is mounted.
66 >e2fsck: Cannot continue, aborting.
67 >
68 >
69 >fsck.xfs: invalid option -- 'p'
70 >Usage: fsck.xfs [options] device
71 >
72 >Options:
73 > -f The device is a file
74 > -L Force log zeroing. Do this as a last resort.
75 > -l logdev Specifies the device where the external log resides.
76 > -m maxmem Maximum amount of memory to be used in megabytes.
77 > -n No modify mode, just checks the filesystem for damage.
78 > -P Disables prefetching.
79 > -r rtdev Specifies the device where the realtime section resides.
80 > -v Verbose output.
81 > -c subopts Change filesystem parameters - use xfs_admin.
82 > -o subopts Override default behaviour, refer to man page.
83 > -t interval Reporting interval in seconds.
84 > -d Repair dangerously.
85 > -V Reports version and exits.
86 >open: No such file or directory
87 >fsck.fat 3.0.28 (2015-05-16)
88 >
89 > * Filesystems couldn't be fixed
90 > [ !! ]
91 > * ERROR: fsck failed to start
92 > * Checking local filesystems .../dev/sda1 is mounted.
93 >e2fsck: Cannot continue, aborting.
94 >
95 >.... snip ....
96 >
97 > * Filesystems couldn't be fixed
98 > [ !! ]
99 > * ERROR: fsck failed to start
100 > * ERROR: cannot start root as fsck would not start
101 > * ERROR: cannot start mtab as fsck would not start
102 > * ERROR: cannot start localmount as fsck would not start
103 > * ERROR: cannot start dbus as fsck would not start
104 >~~~~~~~~~~~~
105 >
106 >Because of the above output I wonder if this is because of some FS or
107 >disk error (crossing fingers for software/config and not hardware) the
108 >culprit could be `fsck.xfs`.
109 >
110 >I have run fsck (including `xfs_repair` on the xfs partitions) on all
111 >partitions, with no problems reported from a trisquell livedisk. I also
112 >tried running fsck on `/dev/sda1` from the installed Gentoo instance;
113 >got no errors and didn't change any behaviour as far as I have noticed.
114 >
115 ># Overview of System
116 >
117 >Sometime in the beginning of October I installed an ssd in this laptop
118 >and migrated to it. The problems started after this, but I am unsure
119 >precisely when as I didn't reboot much in between the migration; for all
120 >I remember now these problems might have started a while after the
121 >migration. `sdb` is the "new" ssd while `sda` is the old hdd.
122 >
123 >As you can see from `fstab` I tried putting `/dev/sdb3` as the boot
124 >partition when I installed the ssd.
125 >
126 >## `/etc/fstab`
127 >
128 >~~~~~~~~~~~~
129 >#/dev/sdb3 /boot ext2 noatime 1 2
130 >/dev/sda1 /boot ext2 noatime 1 2
131 >/dev/sdb1 / ext4 noatime,discard 0 1
132 >/dev/sdb2 none swap sw 0 0
133 >## Old harddisk
134 >/dev/sda4 /mnt/hdd xfs noatime 0 2
135 >/mnt/hdd/home/thomas /home/thomas/hdd none bind 0 0
136 >~~~~~~~~~~~~
137 >-----BEGIN PGP SIGNATURE-----
138 >Version: GnuPG v2
139 >
140 >iQEcBAEBCAAGBQJWayVxAAoJEMUjE08Xv1s5rcoH/3Lz6J7FKByC7xWmkB4iwxx+
141 >oApXUhVfG1+ZJbD6V/EWiPo47aXaen1vOMKadcyw2svpWzZlLpLTQDpOiiGGq9Wj
142 >CCR9VuWlAxJMJZkTm0xEkp7GUAXOR6ln/MJvhbGqnrr1AENj7+QaOVr7rHDziH8M
143 >Ew8oZIQctCFAD8m8dIKkF3E4Jqlu9G7Hyi0MrCuqDJxGrPAXObHKDM2Rlpw1ulb7
144 >bcjekq4Zs0F4VuTpkhM7+6a2jvTCuP1EVdQVGr/J3Czz2P1X6sZr9Wbd9o9TvQO/
145 >LWmYT2KaYXPcWcx3LfWw7U51pv6b5Qf0MS87eEMtcnXjNaIDGt3ADzjMpYJ5ES0=
146 >=FlkE
147 >-----END PGP SIGNATURE-----
148 >