{"id":5,"date":"2010-01-27T14:20:30","date_gmt":"2010-01-27T19:20:30","guid":{"rendered":"http:\/\/blog.fritzhardy.com\/?p=5"},"modified":"2013-09-25T04:27:10","modified_gmt":"2013-09-25T08:27:10","slug":"fedora-upgrade-f11-f12","status":"publish","type":"post","link":"https:\/\/blog.fritzhardy.com\/?p=5","title":{"rendered":"Fedora Upgrade: F11 -> F12"},"content":{"rendered":"<p>A yum <a href=\"https:\/\/blog.fritzhardy.com\/?p=27\">upgrade<\/a> this time left me rebooting only to end up with:<\/p>\n<pre>No root device found\r\nBoot has failed, sleeping forever<\/pre>\n<p>An F11 kernel worked fine, so I know most things went right.\u00c2\u00a0 Numerous searches returned a number of problems like this on Live CDs and USB media.\u00c2\u00a0 I also noted the change from initrd images produced by mkinitrd, to initramfs images produced by dracut.\u00c2\u00a0 Figuring it might be some glitch with the latter, I tried booting my system on the F11 kernel and doing a manual RPM install of an F12 kernel.\u00c2\u00a0 No dice, after installing several of them.<\/p>\n<p>UPDATE 2010-02-03: This issue is tracked at <a href=\"https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=561510\">https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=561510<\/a>.<\/p>\n<p>At this point I resolved to fix a setup issue with my desktop that increased the chances of data loss in the event of drive failure:\u00c2\u00a0a nice six-year old stripe across a pair of dissimilar PATA drives<\/p>\n<pre>\/dev\/sda (40GB)\r\n     sda1: ext3 \/boot\r\n     sda2: lvm Volume00 (ext3 slash, ext3 var, and swap)\r\n\/dev\/sdb (80GB)\r\n     sdb1: lvm Volume00 (ext3 slash, ext3 var, and swap)<\/pre>\n<p>My root in LV Volume00-slash spanned the two drives and was 100GB with only about 50GB in use.\u00c2\u00a0 I set out to split off my home data to sdb1, and put a combined root and var filesystem on sda2 from which to boot.\u00c2\u00a0 I reasoned that by putting my root on a plain old Linux non-LVM partition, dracut should at least find it.\u00c2\u00a0 This involved a lot of steps as root from a rescue boot with everything unmounted:<\/p>\n<p>Shrink the root filesystem down to data_size &lt; X &lt; size_of_drive-fudge<\/p>\n<pre># e2fsck \/dev\/mapper\/Volume00-slash\r\n# resize2fs \/dev\/mapper\/Volume00-slash 64G<\/pre>\n<p>Shrink the LVM logical volume down to size_of_filesystem &lt; X &lt; size_of_drive<\/p>\n<pre># lvreduce -L 69G \/dev\/mapper\/Volume00-root<\/pre>\n<p>Now I needed to empty sda2 of extents and remove it from the the volume group (I cheat in my description here: I was forced to mount Volume00-slash and Volume00-var and copy the contents of var into my slash volume and then &#8220;lvremove Volume00\/var&#8221; and &#8220;lvremove Volume00\/swap&#8221; to make enough space for the pvmove.\u00c2\u00a0 I also needed to run vgconvert to make pvmove happy, as this box was still using LVM1 metadata since it dates back to FC1)<\/p>\n<pre># pvmove \/dev\/sda2 \/dev\/sdb1\r\n# vgreduce Volume00 \/dev\/sda2\r\n# pvremove \/dev\/sda2<\/pre>\n<p>An fdisk to delete LVM partition sda2 and recreate it as a plain Linux partition<\/p>\n<pre># fdisk \/dev\/sda\r\n...delete partition 2...\r\n...new parition 2...\r\n\r\nDisk \/dev\/sda: 40.0 GB, 40037760000 bytes\r\n240 heads, 63 sectors\/track, 5171 cylinders\r\nUnits = cylinders of 15120 * 512 = 7741440 bytes\r\nDisk identifier: 0xa5cba5cb\r\n\r\nDevice Boot\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 Start\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 End\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 Blocks\u00c2\u00a0\u00c2\u00a0 Id\u00c2\u00a0 System\r\n\/dev\/sda1\u00c2\u00a0\u00c2\u00a0 *\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 1\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 41\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 309928+\u00c2\u00a0 83\u00c2\u00a0 Linux\r\n\/dev\/sda2\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 42\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 5171\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 38782800\u00c2\u00a0\u00c2\u00a0 83\u00c2\u00a0 Linux<\/pre>\n<p>Make a filesystem on sda2<\/p>\n<pre># mkfs.ext3 \/dev\/sda2<\/pre>\n<p>Still in the rescue boot, I mounted the new filesystem and the old Volume00-slash in temporary locations.  At this point, I went about doing a &#8220;cp -a&#8221; of all of the directories I wanted on \/dev\/sda2, which would become the new \/ (root).\u00c2\u00a0 In this case, it was everything but home, which I intended to leave in the logical volume that was now isolated to sdb1.<\/p>\n<p>Still not in the clear, as my initrd\/initramfs image still thinks it is trying to boot from an LVM logical volume.\u00c2\u00a0 I needed to reconstruct the initramfs image using the new mkinitrd replacement, dracut.\u00c2\u00a0 To do this, we need to change our rescue boot environment so that these tools have the pieces in place that they need.<\/p>\n<p>The first thing to do is to find the major and minor numbers of the device which will hold our root.\u00c2\u00a0 From the following, we can see that our intended root device \/dev\/sda2 has major number 8 and minor number 2.<\/p>\n<pre># ls -l \/dev\/sd*\r\nbrw-rw---- 1 root disk 8,\u00c2\u00a0 0 2010-01-26 08:51 \/dev\/sda\r\nbrw-rw---- 1 root disk 8,\u00c2\u00a0 1 2010-01-26 13:51 \/dev\/sda1\r\nbrw-rw---- 1 root disk 8,\u00c2\u00a0 2 2010-01-26 08:51 \/dev\/sda2\r\nbrw-rw---- 1 root disk 8, 16 2010-01-26 08:51 \/dev\/sdb\r\nbrw-rw---- 1 root disk 8, 17 2010-01-26 08:51 \/dev\/sdb1<\/pre>\n<p>Now some work to prepare for dracut.\u00c2\u00a0 This is the process I followed, and have used successfully, repeatedly, when rebuilding initrd\/initramfs images.\u00c2\u00a0 It essentially mimics the system as it will be when running with the following set of mounts and chroot.\u00c2\u00a0 Making sure nothing is mounted:<\/p>\n<pre># vgchange -ay\r\n# mkdir \/mnt\/sysimage\r\n# mount \/dev\/sda2 \/mnt\/sysimage\r\n# mount \/dev\/sda1 \/mnt\/sysimage\/boot\r\n# mknod \/dev\/root b 8 2 (major minor numbers from above)\r\n# mount -o bind \/dev \/mnt\/sysimage\/dev\r\n# chroot \/mnt\/sysimage\r\n# umount {proc,sys}\r\n# mount -t proc proc \/proc\r\n# mount -t sysfs sysfs \/sys\r\n# dracut -f -v \/boot\/initramfs-2.6.31.12-174.2.3.fc12.i686.PAE.img 2.6.31.12-174.2.3.fc12.i686.PAE\r\n# umount {proc,sys,dev}\r\n# exit<\/pre>\n<p>Before rebooting, I then had to make sure to change any references in grub.conf and fstab from the old \/dev\/mapper\/Volume00-slash to \/dev\/sda2.\u00c2\u00a0 Amazingly it all worked first try.\u00c2\u00a0 Once the new machine booted, I renamed the old Volume00-slash to Volume00-home, made some adjustments, and mounted it at \/home.\u00c2\u00a0 Voila:<\/p>\n<pre>\/dev\/sda2 on \/ type ext3 (rw,user_xattr)\r\n\/dev\/sda1 on \/boot type ext3 (rw)\r\n\/dev\/mapper\/Volume00-home on \/home type ext3 (rw)<\/pre>\n<p>UPDATE 2010-08-10: Finally bothered to yum update and try four monitors, and am pleased to say this is working again.  Xorg and Nvidia required a number of bugfixes (from what I last recalled).  The Nouveau driver and Xrandr do not like multiple cards (from what I last recalled).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A yum upgrade this time left me rebooting only to end up with: No root device found Boot has failed, sleeping forever An F11 kernel worked fine, so I know most things went right.\u00c2\u00a0 Numerous searches returned a number of problems like this on Live CDs and USB media.\u00c2\u00a0 I also noted the change from [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/blog.fritzhardy.com\/index.php?rest_route=\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fritzhardy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fritzhardy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fritzhardy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fritzhardy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5"}],"version-history":[{"count":24,"href":"https:\/\/blog.fritzhardy.com\/index.php?rest_route=\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":278,"href":"https:\/\/blog.fritzhardy.com\/index.php?rest_route=\/wp\/v2\/posts\/5\/revisions\/278"}],"wp:attachment":[{"href":"https:\/\/blog.fritzhardy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fritzhardy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fritzhardy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}