Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: [SOLVED] hibernate... /bin/echo: write error: No such device
Date: Wed, 12 Oct 2022 03:12:57
Message-Id: Y0Yw4clrEkR9hmJo@waltdnes.org
In Reply to: [gentoo-user] hibernate... /bin/echo: write error: No such device by Walter Dnes
1 On Wed, Jul 27, 2022 at 05:53:08PM -0400, Walter Dnes wrote
2 > One of the last few items on the laptop setup. I emerged hibernate
3 > and copied over the /etc/hibernate/ directory from my desktop. When I
4 > try to hibernate the laptop, I get...
5 >
6 > [thimk][root][~] hibernate
7 > /bin/echo: write error: No such device
8 >
9 > ...with a beep, and the machine comes back.
10
11 PEBKAC++. Multiple facepalm. I outdid myself here. I got lazy on
12 the laptop install by copying config files from another machine... and
13 it came back to bite me. Here was my /etc/fstab ...
14
15 /dev/sda1 /boot vfat defaults,noatime 1 2
16 /dev/sda2 / ext3 noatime,nodiratime,async,user_xattr 0 1
17 /dev/sda3 none swap sw 0 0
18
19 ...but, but, but... this is a used Lenovo laptop, too old for UEFI, with
20 only 75 gigs of disk and I've only got two partitions on it. I
21 corrected fstab to the proper...
22
23 /dev/sda1 / ext3 noatime,nodiratime,async,user_xattr 0 1
24 /dev/sda2 none swap sw 0 0
25
26 I'm surprised that LILO booted at all with the bad fstab. There were
27 only some error message lines that scrolled by really fast at bootup.
28 Otherwise a perfectly normal bootup. I finally got around to stopping
29 the laptop in mid-bootup tonight, and looking at the error message.
30 Something about fsck.ext3 not finding a magic superblock on /dev/sda2.
31 This prompted me to dig through the system and find the problem.
32
33 And, oh yeah, hibernate now works with one quirk. I assume hibernate
34 was reading the swap partition name from /etc/fstab for hibernation. Of
35 course it got "write error: No such device" when trying to save to a
36 non-existant swap partition /dev/sda3. The one quirk is that bootup
37 comes from the first menu item in LILO, unless I manually over-ride. I
38 can parse the boot image name from /proc/cmdline and feed it into "lilo -R".
39 Then I'll have to insert it into the hibernate shutdown scripts.
40
41 --
42 I've seen things, you people wouldn't believe; Gopher, Netscape with
43 frames, the first Browser Wars. Searching for pages with AltaVista,
44 pop-up windows self-replicating, trying to uninstall RealPlayer. All
45 those moments, will be lost in time like tears in rain... time to die.