Fedora Core rescue and umount /mnt/sysimage

Today, I was trying to resize a logical volume of one of my systems running Fedora Core 5, configured with two LVM volumes (one for the root filesystem and another one for swap) on top of a software RAID-0. Since the volume I wanted to shrink holds the root filesystem, I had to boot from the Fedora Core 5 rescue CD in order to reduce the filesystem (ext2online didn’t allow me to reduce the filesystem on the fly), then reducing the volume itself.

Thus, I booted from the Fedora Core 5 DVD by entering linux rescue at the syslinux prompt, then choosed English for both the system language and keyboard layout. Since I was lazy, and didn’t want to manually set up the RAID disks and search for LVM volumes, I told Anaconda to scan the system for a Linux installation and mount it read-only under /mnt/sysimage.

What I didn’t know is that Anaconda also spawns up /mnt/sysimage/usr/bin/bash as the shell (instead of /bin/bash which is the one I expected), appends /mnt/sysimage/bin:/mnt/sysimage/sbin:
to PATH and appends /mnt/sysimage/lib:/mnt/sysimage/usr/lib to LD_LIBRARY_PATH. So, when I tried to umount /mnt/sysimage it failed with a Device or resource busy error message:

# umount /mnt/sysimage/boot
# umount /mnt/sysimage/dev
# umount /mnt/sysimage/selinux
# umount /mnt/sysimage/sys
# umount /mnt/sysimage/proc
# umount /mnt/sysimage
umount: Device or resource busy

The solution was easy, however:

# exec /bin/bash
# umount /mnt/sysimage
# echo $?

13 thoughts on “Fedora Core rescue and umount /mnt/sysimage

  1. I ran into something similar while trying to extend the root (/) partition. I couldn’t get the /mnt/sysimage to unmount. So I ended up booting “linux rescue” from the FC5 CD. Then do NOT mount the file system, instead at the shell prompt do:

    # get the name of the vol group
    lvm vgscan

    # active the vol ie: /dev/Vol files are added)
    lvm vgchange -a y /dev/VolGoup00

    #Check the existing file system for errors:
    e2fsck -f /dev/VolGroup00/LogVol00

    #Resize the root (/) file system:
    resize2fs /dev/VolGroup00/LogVol00




  2. Thanks a lot! Trying to get FC6 installed as a vmware guest, spent half-an-hour recompiling the kernel only for the root fs to run out of space. BTW still needed to ‘umount’ the subdirectories after exec /bin/bash, YMMV. Ta.

  3. Pingback: routethis.net/blog » Blog Archive » Backups? What backups?

  4. Great, thanks! I used the method provided by kazione on RHEL 4, works perfectly. At first I tried umounting /mnt/sysimage, but I guess there where too many connections to that device already and I didn’t want to take half a day killing all those processes…

  5. Thanks a lot Felipe and Kazione, I was looking for something like this, this solved my problem.

  6. I’ve been exploring for a little bit for any high-quality articles or blog posts on this kind of space . Exploring in Yahoo I ultimately stumbled upon this website. Reading this information So i am happy to show that I have an incredibly just right uncanny feeling I came upon just what I needed. I such a lot indubitably will make certain to don’t forget this web site and give it a glance regularly.

  7. Interesting what you are saying about the cat5 cables I tried this to connect 2 pcs together one running XP Pro and one running Win7 with GB network cards and both show a gb connection with crossover cable but I’ve not used anything to check the actual transfer speed, how can you connect 2 pcs directly with a staight through cable?

  8. you are actually a excellent webmaster. The site loading pace is amazing. It seems that you are doing any distinctive trick. Furthermore, The contents are masterpiece. you have done a wonderful job in this topic!

  9. Very informative article, i am regular reader of your blog.
    I noticed that your site is outranked by many other blogs in google’s search results.
    You deserve to be in top-10. I know what can help you,
    search in google for:
    Omond’s tips outsource the work

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s