Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If you haven't changed the size of the parition, the problem may be with the MBR that you boot with rather than the parition itself. Can you mount the windows partition some where such as under /mnt, and then poke around to see if the files and directories are there?
You may simply need to check the contents of your grub or lilo configuration and rerun grub-install or lilo to get back to where you were before.
In windows itself, if you have changed the paritioning, then a drive that used to be the D: drive may now be the E: drive. This might cause problems. Also, windows tends to prefer to be on the first partition of the first drive, but I think you can install XP elsewhere.
Another thing to watch is what the filesystem is that you used to store the image on. For some filesystems such as fat32 you are limited to 2GB. You might also face that limit if you save to a samba share. If you wanted to save a large image to an externel usb drive that already has stuff on it ( so you don't have the reformatting option ), you could use the split command to break up the image on the destination. To restore then you would use the cat command with a wildcard and pipe that to the dd command using the of= option. The input in this case would come from the standard input.
Sounds a huge understaking to me to dd a Windows partition into a file inside Linux as Win2k or XP (for older version there is no need to dd it as their system files can be moved around) is about twice the size of an average installed Linux. Also dd doesn't compress and the image and so the file must be large enough to store the entire sda2 partition including every its empty space.
Still I would have though the command would work if (a) sda2 has not been changed in size or location in the hard disk. (b) The image file has been captured in full.
If you want to use compression, you can pipe the output to bzip2 or gzip. The amount of size reduction will depend on how full the drive was. If you use split to break up the image and save it to an externel drive, you can then use par2 to add redundancy incase one of the files are damaged.
I'm not a big fan of saving images, but after initially installing a system, it can get you back in business quickly after a hard drive failure.
let me summarize what i have figgured out so far (still not working):
partition is still the same size and location.
the problem is not the MBR, because i already have grub installed and, and i am booting my OS from the grub command line myself.
trying to boot from grub command line
Code:
rootnoverify
chainloader +1
boot
[ this gives some error about the partition is not in a proper executable format or something ]
trying to mount
file system type IS vfat. specificly chosen to make sure it was accessable under linux.
Code:
[root@localhost tmp]# mount /dev/sda2 /mnt/sda2 -t vfat
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
[root@localhost tmp]# dmesg | tail
FAT: invalid media value (0x24)
VFS: Can't find a valid FAT filesystem on dev sda2.
hfs: unable to find HFS+ superblock
FAT: invalid media value (0x24)
VFS: Can't find a valid FAT filesystem on dev sda2.
FAT: invalid media value (0x24)
VFS: Can't find a valid FAT filesystem on dev sda2.
here is fdisk and parted information:
Code:
Device Boot Start End Blocks Id System
/dev/sda2 10 1279 10201275 c W95 FAT32 (LBA) <<< looks a-o-k
/dev/sda3 1280 9721 67810365 f W95 Ext'd (LBA)
/dev/sda4 9722 9729 64260 de Dell Utility
/dev/sda5 1280 1407 1028128+ 82 Linux swap / Solaris
/dev/sda6 3321 5233 15366141 b W95 FAT32
/dev/sda7 5234 9721 36049828+ 83 Linux
/dev/sda8 * 1408 3320 15366141 83 Linux
My partition is 10GB but the image file is only 1.3GB this is becaue i recall doing something to not save free space into the image when i created it. (in order to keep the file size smaller)
My partition is 10GB but the image file is only 1.3GB this is becaue i recall doing something to not save free space into the image when i created it. (in order to keep the file size smaller)
could this have something to do with it?
Yes!! But what did you do? You initially showed us the dd command you used, which would have kept the file size the same.
Sorry about the error on the initial dd command. I did it about a year and a half ago, and was just going from memory. its just too bad that i dont remember the correct command that i used. doesn't dd have a built in option for removing free space? i looked through the man page, but nothing caught my eye. surely it does somewhere. i dont recall any other tool i might have used. (on the very small off chance that i did use something else, it still would have been somethign that came with my distro, not 3rd paryy.)
as for sda1... thats a good point, i dont know why i dont have one. i never really thought about this before.
my hard drive has been in this setup since i bought the computer and configured it. I made only one change ever. it involved sda6 and sda7.
sda6 was fat32 and sda7 was ext3
i took all files off both drives and reformatted so that
sda6 is now ext3 and sda7 is now vfat
neither of these partitions have ever had operationg systems on them.
If you compressed the image, you might be able to use the "file" command to find out.
Filesystems can be analyzed with "file -s <imagefile>"
So if gzip was used, then you can use: zcat <imagefile> | dd of=/dev/hda2 bs=512
If bzip2 was used, then you can use: bzcat <imagefile> | dd of=/dev/hda2 bs=512
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.