Sunday, April 4, 2010

Installing Lucid beta -- Adventure Story or Buddy Movie?

It seemed so simple. I went to Kubuntu.org and downloaded and installed the update yesterday afternoon, no problem! This morning, KpackageKit informed me that I had over 1000 updates, and since I was busy with Alsachat, I decided to just let it go, although I was a bit apprehensive about the power situation. We had a wind advisory going on, and I know that disconnecting during updates is a very bad idea. With about 30 minutes to go, however, KpackageKit crashed! When I tried to use the console (as I should have in the first place), I couldn't because KpackageKit had crashed, and not cleanly quit. If I had been thinking clearly, I would have used the command killall kpackagekit, but I thought it was named "kpackageit" -- and didn't look it up. So I restarted, and got a kernel panic!

I didn't panic, though -- I attempted to start in safe mode, without success. Then I selected the next oldest kernel, and dropped down to the command level. However, I was unable to successfully use apt-get update, even there. And I still couldn't boot into kubuntu. I decided that a fresh install of Lucid beta was the best idea, so I decided to write the disk on Anne's old laptop, which now runs opensuse. The problem I ran into there was that the CD drive wouldn't stay closed with a CD in it! I had to tape it closed to successfully write the CD. And my laptop booted with the LiveCD. But when I got to the place in the install where one must decide where to install it, I really was stymied, and scared to wreck my computer. I don't know the last time I backed up my home directory -- I know, bad Valorie! And I knew it was it was on its own partition, but.....well, I poured out my story in IRC, so here is the rest of the story.... [scroll to the bottom if you don't want to read the gory details!]

valorie: I'm so discouraged
valorie: my laptop is borked
valorie: I downloaded and installed lucid beta yesterday and everything was cool
valorie: today, there were over 1000 updates, and stupidly I told kpackagekit to go ahead and download them
valorie: part way through, it crashed
valorie: but anyway, I tried to re-do them with apt-get
valorie: but I couldn't because of the kpackagekit crash
valorie: now I can't get the computer to boot at all
valorie: tried an older kernel, and apt-get update there
valorie: but it kept throwing error messages
valorie: :(
valorie: I dl'ed and burned the lucid beta CD on this old laptop of my daughter's
valorie: but I'm afraid to bork up my computer even worse
valorie: it does look like my son made a separate partition for /home
valorie: but how do I know which one it is?
valorie: I did an fdisk -l /dev/sda
valorie: and can see how big each of the partitions are
valorie: and I know which one is swap, because it says
valorie: but that leaves 3 other possibilities
maco: blkid helps there
valorie: I don't know what that means
valorie: I see the IDs
valorie: 83, 83, 82, 83
valorie: for /dev/sda5, 6, 7, 8
valorie: this SUCKS
valorie: lucid worked just fine last night
valorie: as an upgrade
crimsun: well, sda5 is your extended partition, and sda7 is your swap
crimsun: so either sda6 or sda8 is /home
maco: valorie: 83, 82, etc... sounds like filesystem types. UUIDs are those loooooooooooong strings that identify the partition itself
maco: try "blkid /dev/sda5" for example
valorie: do I have to run that as root?
valorie: it gave me nothing
maco: i was just explaining what they were because of the confusion above
maco: you can type it without the /dev/.. stuff to just get a list of partitons and UUIDs
maco: do what as root?
maco: what gave nothing?
maco: (blkid does not need to be done as root)
nigelb: apparently yes
nigelb: gives me nothing here too
maco: iiiinteresting. i can run plain old "blkid" as not-root and have it be happy
crimsun: as well it should. access to a block device requires elevated privileges.
valorie: as root, it says 5 has uid=0caf054f-9d98-453d-9ab0-d2baf34bcld0 sectype=ext2 type=ext3
valorie: or pretty close to that
valorie: hard to copy from one screen to the other
maco: apparently i'm in a group i shouldnt be in
crimsun: maco: you upgraded; that makes sense
maco: oh
valorie: 6 & 8 are both ext4
valorie: anyway folks, do you think trying to install over top of my previous install would be the best idea?
valorie: I can't recall how old my most recent backup is
valorie: so I really do not want to wipe out /home!
maco: thats what i always do
nigelb: now, thats better :)
valorie: if people will be here to hold my hand
nigelb: valorie, there always will be :)
valorie: ok, I'm to the scary place
valorie: it advocates shrinking /sda1 from 178.5 GB to 105.2 GB
valorie: Kubuntu in 73.3 GB
valorie: sda5 to 235.3 MB!
valorie: I think that was swap, and I had problems when it was too small before
valorie: gads, I don't know if I have the courage
valorie: does it know which one is /home?
valorie: is it preserving it?
valorie: it leaves 6 unchanged in size
valorie: and 7
IdleOne: valorie: use gparted to display your partitions to you and take a screen shot of it. Make notes on paper in "real words" of which partition is what.
valorie: eliminates 8, which used to be 160 GB
maco: valorie_: are you in manual partition mode?
valorie: abort the install and do that?
maco: if you want to reuse the same / partition, you have to choose "manual partitioning" at the partition step instead of one of the guided ones
valorie: Prepare disk space is where I am
valorie: ok
maco: did you figure out which one is currently / and which is /home ?
valorie: no, I have no clue
valorie: I know 1 is windows
valorie: 7 is swap
valorie: aaaaaaaaaaaaaaaaaaaaaaaaaaaaah
valorie: the manual bit expects me to know
valorie: and I know nothing.....
maco: you can mount them and look
valorie: how?
valorie: abort the install?
maco: do you have a desktop right now?
valorie: what do you mean?
maco: or did you do the "just install and don't give me a desktop to use during it" mode?
maco: you're on a live cd right?
valorie: yes
maco: are you able to get to a terminal?
valorie: no, I think I should quit
valorie: this is too scary
maco: no no its ok!
maco: i'll walk you through
maco: let me quickly read back through what you did before
IdleOne: valorie: relax :) remember before you click anything ask yourself this " Did I triple check my double checking?"
valorie: each click so far has been easy
maco: valorie: try sudo mount /dev/sda5 /media ; ls /media and see if that looks like /home or /
valorie: speak english, etc
valorie: maco, there is no way to do that
maco: valorie_: ctrl+alt+f1?
valorie: just the install window
valorie: ah, ok
valorie: ok, no -- it is all abi, config, initrd, system.map, vmcoreinfo, vmlinux
valorie: etc.
valorie: so that must be /, correct?
maco: do you have a separate /boot ?
maco: that looks like /boot
valorie: grub is in there, so maybe
maco: those are the files i see in /boot
maco: ok so we know 5 = boot
valorie: and memtest
valorie: yeah
valorie: ok
maco: now sudo umount /media ; sudo mount /dev/sda6 /media ; ls /media and see what 6 is
maco: if you see root, bin, sbin, var, lib, etc, etc... thats /
maco: if you see your name.... /home
maco: and once you know what that is, since we know 7 is swap, then you can guess what 8 is
valorie: ok, bin, cdrom, etc, home, initrd., etc
valorie: so maybe that's home?
valorie: or perhaps /
maco: thats /
valorie: gotta be root
maco: ls on home in there though
maco: make sure your data isn't really hiding in there
maco: as that'd be bad
valorie: just ls home?
maco: ls /media/home
valorie: k
valorie: nada
maco: ok good
valorie: cool
maco: so then 8 is home
maco: alright back to the installer
valorie: this is making me feel so much better
maco: click on sda5, hit the edit button, and tell it use as /boot, and go ahead and let it format
valorie: control alt which?
maco: probably f7
valorie: nope
maco: try different f#'s til you find it?
maco: (this is what i do)
valorie: 8 did it
maco: ok
maco: click on sda6, hit the edit button, tell it to use as /, and format as ext3 or ext4, as you prefer
maco: click on sda7, hit edit, swap, no mountpoint for swap
maco: click on sda8, hit edit, mountpoint /home, use as ext3 (since thats its current format), and make sure you do NOT have it set to format that partition
valorie: when I click on 5, it brings up a edit partition screen
valorie: new size
valorie: use as
maco: leave the size alone if you want
valorie: format
valorie: mount point
valorie: but use as doesn't have root as a choice
maco: sda5 should be /boot
maco: and thats the mountpoint
maco: sorry, i mixed up when the dialog says "use as" blah. "use as" means "what format do you want?"
valorie: right
valorie: one of the choices is swap
maco: you have ext3 now. you can stick to that or go to ext4 or reiserfs or whatever
valorie: perhaps I was wrong and that was swap?
maco: no, it'll offer all possible filesystems one every partition
maco: since its a new install, if you *wanted* you could make that partition be swap, so it's offering that
valorie: so ext3 journaling file system?
maco: yep
valorie: ok
maco: but i'm assuming you're sticking to the same disk layout you had before
maco: this making sense?
valorie: yes
maco: good :)
valorie: should ANY of them be set "format this partition?
maco: i don't think its necessary, but maybe for /boot might be a good idea since i don't know if it'll actually clear out the old kernels if you dont
valorie: weird, because it shows a check under format for /home and /
valorie: ok
maco: thats because you haven't gotten there yet
valorie: I'll re-look
maco: you'll remove that checkmark when you edit them
valorie: it's grayed out
valorie: the only one that's got a black check is /boot now
maco: you're looking at the table of all the partitions right now, right?
maco: that's read only
valorie: right
maco: you have to click on those partitions and hit "edit"
valorie: so do I do anything to those ntfs partitions?
maco: nah, leave your windows alone
valorie: so click change?
maco: valorie: well i'm not looking at the screen right now, but if the edit button is now the "change" button...sure!
valorie: no, i think forward is the way to do
valorie: otherwise it will create a new partition
valorie: and I don't want that
valorie: correct?
maco: valorie: there's a "new" button and a "edit" one, right?
maco: valorie: you want to use "edit" on each existing linux partition and not use "new" at all
akk: I think I right-clicked on the partition and chose Edit from the context menu.
valorie: right, I edited each
valorie: no new
maco: oh ok
maco: and you got rid of the "format me!" on /home right?
maco: (thats sda8)
valorie: well, it's still got a grayed check mark
valorie: as does 3
maco: but 5 has a black checkmark?
maco: ugh i dont like this UI. it should have *NO* checkmark if it's unchecked. grr.
maco: not a but-look-we-greyed-it-out checkmark to mean unchecked
valorie: 5 has a black checkmark
valorie: yeah, it's confusing
akk: Yeah, having a checkmark at all sounds scary.
maco: ok then i think you're good to hit "next"--just make sure when you get to the end you read the confirmation screen
valorie: but I've tried 3 times ad I can't get rid of it
maco: this is a kubuntu lucid install disk?
valorie: yes, kubuntu lucid beta
valorie: it says that 5, 6, 7 and 8 will be formatted
maco: O_O
valorie: yeah
maco: go back
maco: did you set them to a different filesystem than what they were before? (all ext3)??
valorie: ah, I left a mounted system
valorie: grrr
maco: oooh
maco: sorry. sudo umount /media
maco: then maybe it'll let you edit things properly?
valorie: it will umount, I think
valorie: but I have to go back and redo it
valorie: bleah
maco: sorry :( i should've told you to umount before switching back to the installer
valorie: I'll scroll up -- it will be faster this time
valorie: damn, it's the same
valorie: says all 4 will be formatted
valorie: still with the grayed checkmarks
maco: valorie_: hmm you might need an alternate cd. sounds like a bug.
valorie: yeah, I can't allow that
valorie: :(
valorie: too much there on /home
valorie: gads, burning another damn CD on this machine -- if there is a cd in it, the cd tray keeps coming open
valorie: I had to tape the damned thing shut to get it to burn
valorie: lol
maco: hahaha
valorie: I wonder if my thumb drive is big enough
valorie: rats, I don't have it right now
valorie: :(
valorie: all right, I'll try to burn the alternate CD
maco: valorie: bug filing time too it seems
valorie: I guess as a good netizen, I had better
valorie: searching for liveCD bugs....
maco: ubiquity is the installer package
valorie: bug filed
valorie: now to write another CD
valorie: ok, alternate cd booting
valorie: the autoconfig for network fails, probably because I can't get the wireless to turn on
valorie: can I use the IP address from this machine to manually config?
maco: you can just tell it to skip
valorie: ok
valorie: actually, it is insisting
maco: what?
maco: it doesn't need net to do an install
maco: so it should let you just skip configuration of the interface
valorie: there we go
valorie: ok, i'm to partitioning
valorie: and again chose manual
valorie: then....configure the logical volume manager?
maco: eek!
maco: no lvm necessary
maco: pick the manual-not-lvm one
maco: i've only ever used lvm once, and that was because i *had* to for my system administration class
valorie: guided partitioning
valorie: configure software RAID
valorie: configure lvm
maco: then go to guided partitioning
valorie: configure encrypted
valorie: ok
maco: sounds the most reasonable
valorie: that takes me back to these choices:
valorie: guided:resize /dev/sda1 & use freed space
valorie: use entire disk
valorie: entire disk/lvm
valorie: entire and encrypted
valorie: and manual
valorie: and you already saw the manual choices
maco: and manual is where it brought up the raid stuff?
maco: what the...this is weird
valorie: yes
valorie: maybe guided and use entire disk
maco: no that'd delete everything
maco: hmm i think i need to try this in a vm
valorie: no, not that one
valorie: that just erases the entire disk
valorie: gaaahhh
valorie: oh, duh
valorie: in the manual, I can choose the partitions
valorie: geez
valorie: fear and stress makes me stupid
maco: chamomile tea?
valorie: water, right now
maco: chamomile tea good for getting rid of the stress part
valorie: ok, gonna scroll up and do this
maco: ok
valorie: mount options? label?
valorie: reserved blocks
maco: ignore that
valorie: bootable flag
maco: you don't need to worry about it
valorie: ok,
valorie: for boot -- erase data on this partition
maco: bootable flag goes on your windows i think. iirc, windows won't boot if its not marked bootable, while linux will go "what? grub told me to!"
valorie: hmmm, it makes it sound like I shouldn't erase it
valorie: it can no longer be recovered, etc.
valorie: choices: resize, copy data from another partition
valorie: erase data on this partition
valorie: delete the partition
valorie: done setting up partition
valorie: I assume don't resize
valorie: but erase?
rww: In debian-installer (and Ubuntu alternate CD) speak, delete deletes the partition, erase writes over all the data on it (a la DBAN) and then deletes it, I think.
valorie: the thing is, the header makes it sound like it is going to be erased *anyway*
valorie: "You are editing partition #5 of /dev/sda. This partition is formatted with the ext3 journaling file system. ALL DATA IN IT WILL BE DESTROYED.
valorie: in caps, the last bit
valorie: so I'm thinking my goof in the last go around was telling it I wanted them formatted
valorie: no formatting is probably what I wanted
valorie: ::sigh::
maco: i think this installer makes it slightly clearer than the gui one whether data will be kept. gui one says "format? yes/no" this says "format or keep?" which is a bit clearer IMO
maco: when it shows the list of partitions it puts F if its formatting and K if its keeping, i believe
valorie: so I guess I'm done with 5
maco: ok. now on to the others!
valorie: BUT - if you don't change "use as" --it is "do not use"
valorie: so....
maco: for use as you set what the current partition is
maco: then below that it has a format or keep option
maco: er, what the current filesystem is
valorie: no, it has all the file systems, swap, physical volume for encryption, RAID, LVM, do not use
valorie: and then go back
valorie: I don't see a place to tell it to use 6 as /
valorie: blah
maco: set the filesystem there
maco: for each partition there's a list of things you have to set
maco: "use as" is the filesystem
maco: you also have to set the mountpoint
valorie: right, but it warns above it will be destroyed
valorie: gah
maco: did you not change the "format/keep" part yet?
valorie: which is fine for everything but /home!
valorie: so 8, I think I just don't edit, right?
valorie: do not use
valorie: done setting up this partition
valorie: that seems reasonable to me
valorie: it will want to re-write boot, / and swap
valorie: to re-write
valorie: and don't touch /home
valorie: correctomundo?
valorie: finish partitioning and write changes to disk.....
valorie: there is no K, by the way
valorie: F or nothing
maco: if you do not use 8 it wont know to mount it as /home
maco: but then again, you can always edit /etc/fstab to TELL it to use that as /home after installation's done anyway
valorie: but if I format it, it's dead
maco: I'm pretty sure you can inform it of what format to use AND tell it to keep the data
maco: it should be one of the other questions on the partition edit screen
valorie: no, it isn't
maco: got a camera on-hand? i gotta see this
valorie: it has all thefile systems, swap, physical volume for encryption, RAID, LVM, do not use
valorie: and then go back
maco: yes but those are the options for "use as:" right?
valorie: yes
maco: there are more questions than just "use as"
maco: one of them should be asking whether to format or keep the data
valorie: Partition settings:
valorie: use as: do not use
valorie: blank
valorie: bootable flag: off
valorie: blank
maco: if you change do not use to the filesystem, that blank line might change to "format/keep"
valorie: resize
valorie: copy data
valorie: no, then it changes the menu
valorie: use as: ext3
valorie: mount point
valorie: mount options
valorie: label
valorie: etc.
maco: ok chck out mount options then
valorie: right above it says: All data in it WILL BE DESTROYED
maco: because it hasnt been set to "keep" mode yet
maco: just have to figure out where that mode is hidden
valorie: ok, noatime
valorie: relatime
valorie: nodev
valorie: nosuid
* maco shakes fist at screen
valorie: noexec
valorie: ro
valorie: sync
valorie: usrquota
valorie: rgpquota
maco: ok thats not sounding like it
maco: what's after "etc."
valorie: reserved blocks
valorie: typical usage
valorie: bootable flag
valorie: resize
valorie: copy data
valorie: erase data
valorie: delete
valorie: done
maco: if you go to "erase data" what does it say?
valorie: that's the one that warns that it will overwrite with random chars
maco: hrmph
valorie: I don't see a way to do it except do not use
maco: did you go to "mount point" yet?
maco: does it maybe offer it in there?
valorie: no
valorie: no choice of home
maco: i mean does it offer the dont format thing in there?
valorie: oh, I'm wrong, it does offer home
valorie: but still warns that it will be destroyed
valorie: even if I choose home, then go back and remove the formatting option
valorie: the /home bit disappears
valorie: so I'm guessing the editing is the only way
valorie: oh, I could send the pic to your email
valorie: duh
maco: hmm ok. i *know* pre-lucid had a way to set the filesystem AND keep the data
maco: i used it a bunch during installfests
valorie: gosh, brain is dead
valorie: so, finish partitioning and write changes to disk?
maco: hang on i wanna see this picture...
maco: can you take a pic of the page before that? the one that lists "use as" and "mountpoint" and such?
valorie: ok, I'll go back to that
valorie: sending
maco: valorie: ooooh i see a reason!
maco: valorie: that one is currently ext4
maco: so picking ext3 would mean changing its format
maco: try picking ext4 in the "use as:" and see if suddenly you're allowed to not-format
valorie: voila!
valorie: you are right
valorie: so should I go back and change any of the others?
maco: /home is the only one you care about saving
valorie: ok
valorie: yay!
valorie: I guess my question better would have been
valorie: is there a use to have them all formatted the same?
valorie: ext3 or ext4
valorie: etc.
maco: ext4 for /boot and / tends to mean faster boot
valorie: ok, I'll go back and change 'em
valorie: good grief
valorie: so they are all ext4
valorie: now finish and start partitioning?
valorie: right, maco?
maco: yep
valorie: soooo scary
valorie: it's happening....
valorie: booting......
valorie: gonna unhook here and see...
valorie: btw, /home seems to be fine
valorie: you rock, maco
valorie: and I owe you big-time
maco: yay!
valorie: next, install konvi and uninstall amarok
maco: uninstall amarok???
valorie: I build it from git
valorie: has to be uninstalled first, though
valorie: what the hell
valorie: even though Knetworkmanager can see my wireless
valorie: it will NOT connect
valorie: no matter how many times I tell it to
valorie: grrrrrrrrr
valorie: finally!
valorie: had to restart

Thus endeth the lesson. One bug filed, two CDs burnt, one laptop restored to workability. All in only FIVE HOURS! I certainly wish I had filed a bug when KpackageKit crashed, but I've filed a few from a crash, and without all the -debug and -devel packages installed, they aren't much use. AND I wish I'd thought to look at the spelling of KpackageKIT. On the upside, I installed a new distro version without using Thomas' time. I do owe Maco for 5 hours of work, for sure! I would like to thank crimsun, nigelb, rww, and akk for their help also. #ubuntu-women, you rock!

While preparing this blog post, I needed to remove a bunch of IRC cruft like time stamps, such as [22:53:43] and [03:49:53]. It seemed like a good time to use regular expressions (regex) to remove them in my favorite text editor, Kate. Thanks so much to Afuna on #ubuntu-women who helped me learn a bit. By the way, the magic regex was: \[[0-2][0-3]:[0-9]{2}:[0-9]{2}\] . And I understand *why*! Thanks again, Afuna!

4 comments:

  1. hmm, sounds like quite a trying night. In the event that you might find them useful, here are some tips that I swear by, and might have helped you avoid problems (or at least get them fixed quicker):

    - When partitioning, always assign labels to your partitions. That way you know what they are without having to mount-unmount-repeat.

    - Use and get comfortable with the alternate installer. While the LiveCD is nice for its simplicity and friendliness to beginners, the overhead of a GUI toolkit (as well as X) will always increase the likelihood of screw-ups. The possible points of failure in a system increase relative to the number of functioning parts in the system.

    - Don't rely on KPackageKit for large amount of upgrades. It's horribly unstable software. Until something better comes along (Shaman, anyone?) I use it for small updates but mostly rely on command line tools.

    I wrote myself a small script in Ruby that can use both apt-get and aptitude to perform all the basic package-management tasks I need and works as a "url-shortener" too (ie. "a i " for installing stuff, "a s " for searching package names and descriptions)

    - The next time you format the entire disk, use LVM. I wouldn't recommend this until you have someone with you in person who's familiar with LVM and can explain how it works. But once you understand it (it's not that hard to understand, but online text-only communications convolute things), it can usually save you time and give you more flexibility with your partitions.

    - Obviously, back up your "/home" partition! Set up something automated, like rdiff-backup maybe. It has its faults like everything else, but it's better than nothing (even better than manually backing up an entire partition every time).

    Also, may I suggest that in the future you just paste the irc chat to pastebin or something? Those services usually display the text in a monospaced font, aren't restricted to the small width that your blog has, etc etc.

    Hope you have better luck next time with your updates/upgrades, and happy beta-testing.

    ~mm

    ReplyDelete
  2. I sympathize with your problem, and I had similar adventures in the past.
    What I can advice people about upgrading is to use:
    "aptitude upgrade"
    for upgrade purposes. In my opinion it handles dependencies better than "apt-get upgrade".

    ReplyDelete
  3. Welcome to linux and get used to shit like that.

    For me and many others, knetworkmanager doesn't connect to wireless (WPA2) for about 2 kubuntu releases now; the bug is not assigned to anyone and it's medium importance. I switched back to gnome since not even the gnome network managed didn't worked inside kde. Fuck it for now. Oh well... Each with it's own.

    ReplyDelete
  4. Note to self, courtesy of jussi:

    Next time, try "apt-get install -f" and "dpkg --configure -a" before panicking. :-)

    Thanks!

    ReplyDelete