Even if this incident shall drive me away from Sabayon, i figured i'd start a thread on how to repair your system when things go wry, since i've already gathered some experience in that direction. Eventually, a wiki article can be created from the contents within this thread. But most-importantly; help me fix my stuff!
What, how and why
The story behind what made me write this and how i got where i am: August 15th, 2010. Some time around morning i had this idea of a simple boot splash. My initial idea of just having the percentage of the booting progress displayed in big bold letters didn't work out (i figured i'd need a different boot engine = too much work), so i settled for an even simpler design, and, to my surprise, it worked really well: http://amoebios.wikispaces.com/splash.loading. Then i wanted to try something else, and, to not having to reboot the system every time i wanted another way to test the splashes. There is a tool for that, but getting it to work requires some patience. i remembered reading a mention about qemu on this forum, so i searched a bit and found the command "qemu -hda sda" (Don't do this, obviously. Add "-snapshot", at least.), which seemed to work alright. After trying to restart the virtual system it seemed to be stuck, so i closed the emulator window. Everything seemed fine and i kept doing usual things, like searching files, editing graphics and reading man pages. i simulated booting with qemu several times, but it printed some errors of which i thought were due to the "fake booting", where software tries to access hardware that isn't really there. That's what i thought. i don't understand emulation. Anyway, the errors prevented me from viewing the silent boot splash, so i restarted my laptop. On the next startup the system failed to start the X server, went to the command line and printed "(none)", where "acer-sabayon" should be printed.
Now, before attempting anything, you should save what's left to save with a LiveCD, for example. i used Knoppix, the mother of all LiveCD's (the LiveUSB i used to install Sabayon was long overwritten). On a default Sabayon install you first need to make the filesystem accessible. At this point i should mention that you will need to use the command line. Open a terminal. (the $ at the beginning of a line indicates a normal user, while a # indicates root. You don't need to type these.)
Code: Select all
$ su (type your password or just press ENTER when in a liveCD) # cd /mnt # mkdir lvm # vgscan --mknodes # lvchange -a y /dev/VolGroup00/LogVol00 # mount /dev/VolGroup00/LogVol00 /mnt/lvm
If everything went as planned you can now access the logical volume at /mnt/lvm and copy the contents to your backup media. (most-likely an external USB drive or a second disk)
The Repairing begins - Restoring passwords
A useful tool for repairing a system is chroot. Okay, i only ever used it to restore passwords, but theoretically it could be useful for lots of other things, like.... since it.... okay, restoring passwords is probably the most useful thing, so let's stay with that. Here's how:
First, you gotta mount the system. In our case, we have already mounted it on /mnt/lvm and we can leave it there. You still have the terminal open, right?
Code: Select all
# chroot /mnt/lvm /bin/bash /# passwd (type a new password)
To fight bugs you need to find them. In log files, for example. In Sabayon there's a toolset (a script, technically) called
Sabayon Live Tools that can be installed with the command
Code: Select all
# equo update (we need to update first) # equo install sabayonlive-tools now, you can launch it with # sabutil menu
If you have a bug cornered and know what to report do so at http://bugs.sabayon.org/ .
If all else fails
"Google is your friend", they say. Now, i never met or talked to Google in person, but i do find its use helpful at times.
Equipped with this knowledge i attempted to fight back the aggressor (the evil bugs), but, alas, i'm outnumbered, need help! (at:home) (health:1) (armor:0) (w:puny knowledge).
The terminal prints several ".... - is a directory" and ".... - no such file or directory".
Which logs shall i paste?
Why i cling to this configuration
30 - 40 gigabytes of applications + customization. You'll understand that reinstalling and reconfiguring that from scratch will take time. i have time, but not the patience. i don't want to do it all over again!
i have a fresh liveDVD and can access my files. It's at my fingertips! Can't i just overwrite what's broken? Or what do i have to save before i do a fresh install?
Why should this drive me away from Sabayon.... there is no failproof system. And Sabayon is fun to use. Install a proper backup solution, save an image of your install regularly, keep a backup of your files. No matter what system; there's always something silly that can fail. It could be stolen or hacked or fall down. Maybe you get mad and throw it against the wall or "someone" "accidently" deletes everything, just to regret it.
Hint to devs
To-do: automatic backup solution: when the installer recognizes a (large enough) free medium, ask whether to setup automatic backup (copying an image of the installed system). (Prompt to) overwrite existing backup when not enough space.