SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am trying to execute chroot command by changing the root in ubuntu machine.
Let me explain the situation.
I was mounted an ubuntu image in /mnt/ubuntu directory using follwoing command : mount /dev/mapper/loop1p1 /mnt/ubuntu
it was successfully executed. so finally i want to install new package in the ubuntu image which is ther /mnt/ubuntu . In order to execute the chroot command i was setting chroot environment by following commands:
mount -o bind /dev /mnt/ubuntu/dev
mount -o bind /proc /mnt/ubuntu/proc
mount -o bind /sys /mnt/ubuntu/sys
The above commands also executing successfully.
finally i am trying to install linux-image kernel package on mounted image which is there in /mnt/ubuntu.
chroot /mnt/ubuntu dpkg -i tmp/linux-image.deb
chroot: failed to run command `dpkg': No such file or directory
I think you need to have a look in /mnt/ubuntu when it's mounted -- it seems it does not contain files necessary for chrooting (or booting). Either some important directory is not being mounted, or you do not have a complete Ubuntu install on /dev/mapper/loop1p1.
first i have taken one ubuntu image which is ubuntu-flat.vmdk .
this i have converted into raw format using qemu converter
qemu-img convert ubuntu-flat.vmdk -O raw ubuntu-flat.raw
i find out the free loop device . suppose i have taken loop5 in /dev/loop5 location.
losetup /dev/loop5 ubuntu-flat.raw.
kpartx -a /dev/loop5
mount /dev/mapper/loop5p1 /mnt/ubuntu
mount -o bind /dev /mnt/ubuntu/dev (for this befor i have created dev directory in the /mnt/ubuntu location manually)
mount -o bind /proc /mnt/ubuntu/proc(proc also created before executing)
mount -o bind /sys /mnt/ubuntu/sys(sys also created before executing)
next i am trying to execute
chroot /mnt/ubuntu dpkg -i /tmp/somepackage.deb