Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Some time ago i took an image(made a copy of the entire partition using dd command)on my linux installation partition on my external usb hard disk . Now i wish to overwrite my linux installation partition with that image file. From what i understand i need to do the following:
a) boot the system from any linux disk (i am using Knoppix 5.1.1 LiveCD here).
b) mount the usb drive. (it is mount automatically by knoppix under /dev/sdb2
--> Big problems here. the image file is /mnt/sdb2/Linux.img . i created a new dir 'temp' in /mnt (i think this dir is in ram since i am using a LiveCD).
mount -o /mnt/sdb2/Linux.img /temp
This should mount the image to the mentioned directory. But knoppix gives me an error saying no such mount point in /etc/fstab or /etc/mtab.
i tried being clever and edited the /etc/fstab file but :
a) mount -o option does not seem to work there.
b I tried using the same syntax as is being using my knoppix to mount /dev/sbd2 to /mnt/sdb2 (in place of it , i used /mnt/sbd2/Linux.img /mnt/temp), knoppix says the special device /mnt/sdb2/Linux.img does not exit..
I am stuck here. How can i mount this file to a directory so that i can overwrite my existing partition with it????
Any suggestions or ideas ????
c) over write the parition using
dd if=/mnt/temp of=/dev/sda7 bs =1024k
This should do it?
PS: Can i make a similar king of backup with rsync ...... i this that would save a bit of space as well as time (when i update the backup so to speak)
i managed to mount it alright. Now it is mounted on /mnt/Temp.
I tried the following:
dd if=/mnt/Temp of=/mnt/sda7 bs=1024k
I get the msg Temp is a directory. and nothing is copied.
I also tried
dd if=/mnt/sdb2/Linux.img /mnt/sda7 bs=1024k
Now i get the msg that /mnt/sda7 is a directory........Whats going on. I think it might work with /dev/sda7 , cause this was how i had created the backup in the first place. But what is the difference between saying /mnt/sda7 and /dev/sda7 ....?????
and just for the sake of it, why cant i get it to copy the mounted image (from /mnt/Temp to /mnt/sda7 )
Does it has anything to do with the way /dev/something is treated etc??
If you think of it writing on /mnt/sda7 is a directory and therefore you need to give a name to the whatever being written there as Linux allows you to store many files inside so it has to know what it is called.
If you write on a device you don't need to give a file name because it is a native writing of "1" and "0" starting from the first sector and lasts as long as the source file, taking one record at a time with size specified as per "bs".
I doublt if the destination with a file name will work in dd in a full partition restoration because on dismounting Linux would not know where to copy the file to. In a normal dismount the files are written to the filing area starting from Sector 1 and the boot sector (Sector 0) is not touched. Whenn dd clones a partition it always starts with Sector 0 and so the boot sector is always included.
Thanx for clearing that bit of confusion up. I finally managed to restore the linux from the backup and now am backup and running again. It really was great. It had taken about 5-7 mins to create the backup image and same time for restoration. It really is a wonderfully cheap solution to taking backups.
Thank you everyone for helping me through this.
By the way just for the sake of it, in case someone else stumbles across on this thread, i used
dd if=/mnt/sdb2/Linux.img of=/dev/sda7 bs=1024k
to overwrite my linux root partition with the backup.