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!
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.
In an nutshell an extended partition allows one to create more then 4 partitions and is basically a container for logical partitions (anything >=5). hda2 was probably the extended partition where hda5 was located. So basically you wiped out everything except swap. Since hda5 does not exist anymore grub can not find the menu.lst file which is why you only see grub prompt. Since your prepared you might as well reinstall everything then try to recover.
When I boot the Fedora install disk in rescue mode it locates my Fedora installation. It is possible that I described the partitions wrong.
Anyhow, I finally got DD to work and it restored my MBR. Should have worked, right? Now Gparted and the Fedora install CD can't see ANY partitions.
The rescue disk still finds my installation when it searches the drive.
When I run
dd if=/mnt/sysimage/boot/grub/MBR-backup of=hda bs=512 count=1
everything seems to go fine.
Can I used dd to make a 20GB image (of /mnt/sysimage/)while in rescue mode and then copy that image to right place on hda (which now appears to only have one 60GB unformatted partition)?
Your /boot should be hda5 and everything else (i.e. / and swap ) is in hda6. To rebuild grub to the MBR run these commands:
chroot /mnt/sysimage
grub-install /dev/hda
Personally I wouldn't touch a disk with a trashed partition table like that. I might try testdisk to resurrect it.
Restoring an MBR (especially the partition table) after deleting partition(s) and reformatting cannot work.
Basically I'd erase the whole thing and restore the lot.
OK, here's what I did. Maybe it'll help some other noob if I post it, eh?
Tried the grub-install, but it didn't work because of the trashed partition table. That was good advice to not mess with it, I agree - it's not worth saving.
When I said I was prepared, of course that didn't mean I had a backup, heh! I got into Fedora rescue mode, mounted a 1GB flash drive and moved about 7GB of zip files, 1GB at a time. That rescue mode really saved my ass! I had to reboot a few times before I got it all right
As I write this I'm reinstalling Fedora, XP is gone gone gone, and now that I know enough to actually USE the 60GB in Linux, Fedora gets the whole drive. !
Here's the commands that I used, to the best of my recollection:
mount /mnt/sysimage/dev/sda1 /media
**zipped a bunch of files to /media
umount -a /mnt/sysimage/dev/sda1
When I was ready to repeat the process, Fedora kept telling me to specify a filesystem, which it didn't ask the first time. So a reboot after each 1GB was the order of the day. I also had to format the flash drive each time, which I did (fat) on an XP machine while rebooting Fedora. It is a Kingston flash drive. The hard drive is a Seagate 60GB circa 1995, ST3600something.
This was a very interesting experiment I hope to NEVER repeat. I'll be back soon as I try to set up my RAID drives! thanks
Last edited by armchair rambo; 02-26-2007 at 08:13 AM.
I was really suprised to see that NTFS partition. After 12 hours (including sleep, heh) I think I was in too much of a stupor to see what you just pointed out. I've broken/revided XP enough times to know fdisk /mbr --
BTW, an observation: it's worth switching from XP to linux just for the ease of backups! I have NEVER been able to restore an XP box to this state of readiness so quickly.
I don't believe v00d00101 suggestion will work, as (NT based) fixmbr looks for a valid partition before proceeding - must be a primary partition, must be marked bootable, and must contain ntldr. Based on some empirical test I have done, not having seen the code.
A small variation after zapping the MBR though - use fdisk to define a NTFS partition with the same start and size as above. This will work if the filesystem is undamaged.
Used to be fdisk wouldn't open a disk that didn't have the disk signature bytes so I habitually only zap 510 bytes.
You know that 60. gb is kind of under par for drive pace now a days. So I'd suggest that sense hard drive pace is $3.05 a gigabyte you could drop about 105.00 at tigerdirect and byuyy 320 gigbyte sata drive and have more than ten times the drive space you do now for 3.05 a gb.
cheap stat hard drive
Last edited by inspiron_Droid; 02-26-2007 at 08:33 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.