LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-27-2006, 01:32 AM   #1
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Boot cd initrd error - pivot_root: Device or resource busy


Currently making a boot cd on a Slackware 10.0 machine using a 2.6.16.18 kernel and mkinitrd that comes with Slackware 10.0 . I have compiled ext2, ext3, reiserfs, ram and initrd into the kernel and not as a module.

but I still keep getting this error that I have searched google for but still cannot correct it.


Error:
Code:
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 180k freed
/boot/initrd.gz: Exiting
pivot_root: pivot_root: Device or resource busy
Kernel panic - not syncing: Attempted to kill init!
I had similiar problems with it trying to mount the root system on the root device, I commented it out and those errors stopped, but this doesn't work for pivot_root, and I'm not sure if commenting out the mounting has something to do with it, I think the root device was already mounted and was returning the busy error.

Here is the linuxrc files created by mkinitrd, if someone has any ideas would greatly appreciate it

linuxrc:
Code:
# Mount /proc:
mount -n proc /proc -t proc
echo "proc mounted"

# Load kernel modules:
if [ ! -d /lib/modules/`uname -r` ]; then
  echo "No kernel modules found for Linux `uname -r`."
elif [ -x ./load_kernel_modules ]; then # use load_kernel_modules script:
  echo "/boot/initrd.gz:  Loading kernel modules from initrd image:"
  . ./load_kernel_modules
else # load modules (if any) in order:
  if ls /lib/modules/`uname -r`/*.*o 1> /dev/null 2> /dev/null ; then
    echo "/boot/initrd.gz:  Loading kernel modules from initrd image:"
    for module in /lib/modules/`uname -r`/*.*o ; do
      insmod $module
    done
    unset module
  fi
fi

# Initialize LVM:
if [ -x /sbin/vgscan ]; then
  /sbin/vgscan --mknodes
  sleep 10
  /sbin/vgchange -ay
fi

# If /rootdev isn't set, we'll have to trust exiting to work here.
# It's harder to clean up the initrd without a pivot_root,
# so it's a good idea to set rootdev (and rootfs) properly.
if [ -r /rootdev ]; then
  if [ "`cat /rootdev`" = "" ]; then
    exit 0
  fi
else
  exit 0
fi

# Switch to real root partition:
ROOTDEV=`cat /rootdev`
ROOTFS=`cat /rootfs`

# Change root device to /dev/ram0
echo 0x0100 > /proc/sys/kernel/real-root-dev

#mount -o ro -t $ROOTFS $ROOTDEV /mnt
ERR=$?
if [ ! "$ERR" = "0" ]; then
  echo "ERROR:  mount returned error code $ERR.  Trouble ahead."
fi
unset ERR
umount /proc
# OK, in case there's no initrd directory:
if [ ! -d /mnt/initrd ]; then
  mount -o remount -o rw -t $ROOTFS $ROOTDEV /mnt
  mkdir -p /mnt/initrd
  mount -o remount -o ro -t $ROOTFS $ROOTDEV /mnt
fi
cd /mnt
# bye now
echo "/boot/initrd.gz:  exiting"
pivot_root . initrd
exit 0
 
Old 08-01-2006, 12:50 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally Posted by fotoguy
Code:
echo "/boot/initrd.gz:  exiting"
pivot_root . initrd
shouldn't you continue the script?

Code:
exec chroot . /bin/sh <<- EOF
    umount /initrd    # unmounts ramfs
    /sbin/blockdev --flushbufs /dev/ram0   # clears ramsfs
    exec /sbin/init ...    # start the real init
EOF
 
Old 08-03-2006, 07:44 PM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Original Poster
Rep: Reputation: 62
Quote:
Originally Posted by konsolebox
shouldn't you continue the script?
Thanks for the reply konsolebox, I thought it may need some more to the script, but thought that at least mkintrd would bring it to a console so you could then do some more customising.

I tried your suggestion and got a little further before running into some more problems, I think I will have a go at modifying the original slackware intrd.img and use that. I can get it to boot up to the command line, but I just have too work out how to get it to run the gtk+ based application I have designed.

Thanks very much for the suggestion and time.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Device or resource busy error obulpathi Linux - Laptop and Netbook 1 01-20-2006 04:03 AM
Device or Resource Busy deepfrybonanza Linux - Wireless Networking 1 02-18-2005 03:27 PM
FC2 wont boot (umount: /initrd: device is busy) msie02 Fedora 2 10-30-2004 03:03 PM
realtek rtl8139 gives device or resource busy error with slack 9.1 /xp dualboot joe83 Linux - Networking 2 06-10-2004 07:32 AM
Device or resource busy teeno Linux - Newbie 3 03-09-2004 10:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration