Warning: there's a couple "fun" ( aka "new to me") things in this LONG
email. SUMMARY 2-lines-below:
1) on reboot, an initramfs prompt, errors only seen briefly as boot screen
overwrites it. Needed fsck.
2) later when things got worse, my solution followed by a different error
message re: "environment block too small".
the LONG story:
Months ago i managed to move wife/maureen's desktop environment to
Mint(ubuntu underneath).
Usage: firefox,gmail (almost nothing else of note. This took some
persuading, but desktops are such a fallback these days......another topic
for another day)
DESKTOP: 10?yr-old Gigabyte motherboard with sata2/sataII ... 4 ports. I
only use 1 sata port.
I "gave" it a $90/bestbuy 256g SSD Samsung months ago for /dev/sda
which ran well+fast of course, turns out the SSD is actually still fine
internally.
A FEW WEEKS AGO, the "hint" symptom (1 of 2 in this long story) for disk
woes was....
( it started crashing occasionally, then)
ON BOOT, it would sometimes STOP at this prompt
initramfs>
and with good eyes as the boot-attempt screen(s) would fly by and return to
above prompt,
I discovered I could fix it with ( actually i did not use the "-y"
prompt, but it's the same fix either way)
initramfs> fsck -y /dev/sda1
Which worked every time (a few times), nothing scary for an
ex-unix-sysadmin, followed by
initramfs> exit ######## would allow it to boot and
be OK for days or so.
I taped THAT magic (fsck...) onto a paper mini-sign on the PC for another
rainy day.
TODAY, the crash was followed by not booting (random results, kernel panics
or bios/grub waiting).
So I brought the SSD to my other living room desktop (not booting FROM
it...)
checked SSD with sudo smartcl -a /dev/sda #### AND ITS FINE.
I moved the SSD "back" to wife's PC on another SATA port.
It's fine! (motherboard deteriorating i guess....but might last another
decade).
I did run into.... ("created" by moving the disk i assume)
.... a boot/warning error NEW TO ME:
On initial boot a WARNING ERROR on the early/black screen
(similar to where initramfs> shows up..just before that i think)
"warning: environment block too small"
was actually ignorable (after a few secs, boot marched on to kernel/logo).
But I found "it's a thing" and the error appears solvable with first google
hit suggesting
linux user# sudo rm /boot/grub/grubenv # or "mv" it somewhere.old; 1024
byte file.
...............# sudo grub-editenv /boot/grub/grubenv create
and reboot. Seems good now except (new i think; probably from the sata
port move?)
there's a ONE MINUTE wait on the initial boot with the Mint logo flashing.
Final things-to-inspect: (no need to "fix" /etc/fstab
which of course does find the disk parts ( just / and swap)
by UUID
and /var/log/syslog ( I have exportedthe old history to study, i think the
disk errors stopped. )
=========================WRAPUP
Haven't solved this learn-all mission yet, but...hope to make it to WLUG
THURS EVE
and i just thought of a (this) topic. Trick is knowing where to start such
a story/tutorial;
I'd try to skip over BIOS and sata/disk/etc basics, the fuzzy parts for me
involve "initramfs" ... grub ..... and maybe that's it for me.
Desired talk/take-home: linux BOOT steps you don't want to know. -doug