Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Help understanding a disk near-disaster



HI... me again. I'd like some help understanding what happened the other
day when I came (it seems) close to disaster as a result of trying to be
clever :-S

So... what I wanted to do was to be able to hibernate my laptop, boot
off a live USB stick, then shut that down and wake up the original OS
intact. I had tried just doing this the naive way before, but found on
waking the original booted OS, that it had been corrupted by the live
boot - I figured, after a little thought, because the original boot was
storing its state in the swap partition, and the live boot was using
that for swap, thus corrupting it.

"So," I figure, "if I can establish a separate partition for the
hibernate to use, I'll be ok."  Just recently got around to setting that
up. Hibernate is told where to store its state by the "resume" keyword
on my grub boot cmd line (resume=/dev/sda5). If there's somewhere else
that needs to be configured, I'm not aware of it. My normal swap is on
/dev/sda8. At first I configure sda5 to be of type 82 (Linux swap).

When I first try this out, I can't hibernate. D'oh... right now can't
remember exactly what happened or what I was told. However I try
changing sda5 to type 83 (Linux) on the fly, and that works, for some
reason.  I try hibernating and waking up a few more times this way, and
it seems fine (but without rebooting in between).

So, full of confidence, I go ahead (later) and try booting a live distro
during one of these hibernations. Herein, I mount sda6, a file system
that is normally mounted on /opt (don't ask), that I want to store some
stuff on so I can get to it from my normal system. Funny thing is, when
I wake up, a file I copied into sda6 is not there. I try
hibernate/reboot-
into-live sequence again, try to pay close attention and do everything
carefully - unmounting sda6 properly in the live boot before waking up,
etc. No good.

Again, can't remember the exact sequence, but I must have had
opportunity to cold reboot the main OS, and...... goodlord.... terrible
filesystem errors emanate from sda6. Crap is duly scared out of me.
I go into root and do fsck.ext4 and repair the errors and, long story
short... now everything seems fine. No damage is apparent (yet).

So....... I'd be grateful if anyone can figure out from this story why
this didn't work, and why my sda6 (normally /opt) should have been
corrupted in this way by trying to mount and modify it during the live
boot.  I've continued hibernating and waking up since then, using the
same sda5 (type=83) resume partition (that isn't used for anything
else), and that aspect seems fine.

Even if you only have the "correct" instructions for how to do this kind
of "boot alternation", I'd love to hear it :-)

よろしく。

Dave


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links