[ale] Buwahahah!! Success!

Charles Shapiro hooterpincher at gmail.com
Wed Aug 30 17:36:45 EDT 2023


About three weeks ago piglet, my primary desktop computer, pooped out.
Press the power button and the fans came on, but nothing else happened --
no POST, no screen, like, Nuthin'.  Went through all the hardware
troubleshooting I knew, carted it around to a couple of friends who are
smarter than me, but never revived it. It was a Core I7 motherboard
obtained surplus 5 years ago after a hard life as a server, so I reckon it
was no big surprise it finally bit the dust.

$500 or so and a couple of sessions at Decatur Makers later I'd replaced
everything but the Mass Storage, the video card, and the case.  She would
boot to the BIOS screen np. I could get the GRUB screen but no further --
she'd would just Kernel Panic.  The new guts are a 12th gen Intel I9 on a
Gigabyte Aorus Z690 gen 1.4 MB, so maybes that had something to do with it.

Fortunately, I keep my OS on a 120 GB SSD, and my /home on a much larger
Spinning Rust drive. So I knew that I wouldn't have to go back to my
(shamefully aged) backups.  I installed Debian 12 on the SSD (up from
Debian 11) and got her to boot ok.

I configured my original install to use lvm without really understanding
what that meant, so  my /home wouldn't actually, like, mount with a simple
mount(8) command. Cue a deep-dive into lvm, helped along by an excellent
tutorial ( https://linuxhandbook.com/lvm-guide/ ) which also let me delve
into the Wonderful World of Vagrant.

After groveling through all that mess, I did the following:

* vgrename the old piglet-vg vgroup to piglet-home-vg ( using the UUID
grabbed from vgdisplay so I was sure to rename the correct one)
* vgchange -ay piglet-home-vg to 'activate' my renamed vgroup
* vgscan --mknodes to fiddle the file system to recognize my new logical
volumes
* Verify that I could now mount(8) my piglet-home-vg/home lvolume on /mnt
(Yay!)
* systemctl set-default multi-user.target to bring the machine up with no
GUI and log in as root
 * Move the installed /home to /home-debian12-default ( in case I needed to
grab some stuff from there to make the Debian 11 settings for Plasma work
with Debian 12).  Make a new empty /home to serve as a mount point.
  * Edit /etc/fstab to mount /dev/mapper/piglet--home--vg-home on /home
  * systemctl set-default graphical.target to bring the machine back up

Of course I still have a bunch of software to install and some stuff to
bring back from my backup ( all my local apache stuff is gone for example).
But it's really all over but the shouting.

Fun Things I Learned:

  * If you screw up an entry in /etc/fstab, Debian 12 will halt during the
boot process when it tries to mount disks.  On some occasions, it'll
attempt to mount your screw up for a while and time out after a minute and
a half or so, but other times I think it just dies.  You can fix this by
choosing Emergency Mode from the GRUB menu and fixing the bad edit in your
/etc/fstab.  Or I suppose you could boot from your stick again if that
rocks your sox.

  * Debian 12 doesn't appear to let you mount an lvolume from fstab  by
UUID. I could do this on my VM, which was running Ubuntu. On Debian you
mount from /dev/mapper, which seems to be the Correct Way (at least that's
the way shipped lvolumes are mounted).  There's some magic going on here
that I still don't fully understand. Some of the hyphens in the /dev/mapper
lvolume names are doubled, again for reasons which are inscrutable to me.

  * Hardware can be Tricky.  If you don't plug in ALL the power connectors
on your MB, it will simply refuse to start at all.  Then you will tear your
hair out until you figure out the dumb misteak you made. And if you get
checksum errors late in your install off a Stick, it means that the media
is no good no more.

   * vagrant and lvm are pretty way kewl.  Learning on a virtual machine
let me hack away at lvm and other scary stuff (like parted(8) and mkfs(8) )
break things, and still not disturb anything important on my personal
machines.  Highly recommended.

All in all a lot of fun.

-- CHS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.ale.org/pipermail/ale/attachments/20230830/73e08288/attachment.htm>


More information about the Ale mailing list