Thread View: alt.linux
12 messages
12 total messages
Started by preamp
Sat, 24 Feb 2001 04:40
Lost partition
Author: preamp
Date: Sat, 24 Feb 2001 04:40
Date: Sat, 24 Feb 2001 04:40
18 lines
1995 bytes
1995 bytes
I just installed Mandrake 7.2 and due to (I think) a stupid mistake of
mine, I have lost a FAT32 partition. (no biggie, as it was a
data/application volume only and I have backups of everything that can't be
reinstalled)
What happened (again I think) is that I told the install to write the boot
manager to /hda5 instead of /hdb5 (where Linux really was). Anyway, now if
I try to mount /hda5 - this is the result...
[root@localhost /root]# mount /dev/hda5 /mnt/temp -t vfat
mount: wrong fs type, bad option, bad superblock on /dev/hda5,
or too many mounted file systems
Windows (2000) thinks it is an unformatted partition.
Is it gone for good...or it there a way to get it back?
Re: Lost partition
Author: Robert
Date: Sat, 24 Feb 2001 07:21
Date: Sat, 24 Feb 2001 07:21
40 lines
2987 bytes
2987 bytes
From a total non-expert (use at own risk) I deleted my entire c drive (windows 98) trying to add NT to the mix, and managed to restore the entire drive using a software program called MRECOVER XL which was made to recover from damage from the CIH virus. For my purposes it worked perfectly, though there was a scary moment before rebooting a few times and changing the bios settings back to their default values when NO disks were detected on bootup. Anyway the final result was a very nice surprise. Again, use at your own risk, as it was just a shot in the dark for me. (tried a few commercial demos of data recovery software with no positive results and LONG processing times. This did the job in minutes. I have no idea if it would work in your case, but if you are desperate... http://members.nbci.com/monirdomain/ look for mrecover xl at above site. Robert "preamp" <preamp@spamblock.dingoblue.net.au> wrote in message news:3a973ada$0$25511$7f31c96c@news01.syd.optusnet.com.au... > > I just installed Mandrake 7.2 and due to (I think) a stupid mistake of > mine, I have lost a FAT32 partition. (no biggie, as it was a > data/application volume only and I have backups of everything that can't be > reinstalled) > > What happened (again I think) is that I told the install to write the boot > manager to /hda5 instead of /hdb5 (where Linux really was). Anyway, now if > I try to mount /hda5 - this is the result... > > [root@localhost /root]# mount /dev/hda5 /mnt/temp -t vfat > mount: wrong fs type, bad option, bad superblock on /dev/hda5, > or too many mounted file systems > > > Windows (2000) thinks it is an unformatted partition. > > Is it gone for good...or it there a way to get it back? > > >
Re: Lost partition
Author: sandy
Date: Sat, 24 Feb 2001 23:19
Date: Sat, 24 Feb 2001 23:19
12 lines
1561 bytes
1561 bytes
run; # fdisk /dev/hda -l # fdisk /dev/hda Command (m for help): p Command (m for help): x Extended command (m for help): p and report results. Keith
Re: Lost partition
Author: preamp
Date: Sun, 25 Feb 2001 06:15
Date: Sun, 25 Feb 2001 06:15
60 lines
3007 bytes
3007 bytes
sandy wrote: > > run; > > # fdisk /dev/hda -l > # fdisk /dev/hda > Command (m for help): p > Command (m for help): x > Extended command (m for help): p > > and report results. > > Keith > > OK, thanks...here are the results...... Disk /dev/hda: 255 heads, 63 sectors, 525 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 261 2096451 6 FAT16 /dev/hda2 262 525 2120580 5 Extended /dev/hda5 262 392 1052226 b Win95 FAT32 /dev/hda6 393 525 1068291 7 HPFS/NTFS [root@localhost /root]# [root@localhost /root]# fdisk /dev/hda Command (m for help): p Disk /dev/hda: 255 heads, 63 sectors, 525 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 261 2096451 6 FAT16 /dev/hda2 262 525 2120580 5 Extended /dev/hda5 262 392 1052226 b Win95 FAT32 /dev/hda6 393 525 1068291 7 HPFS/NTFS Command (m for help): x Expert command (m for help): p Disk /dev/hda: 255 heads, 63 sectors, 525 cylinders Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID 1 80 1 1 0 254 63 260 63 4192902 06 2 00 0 1 261 254 63 524 4192965 4241160 05 3 00 0 0 0 0 0 0 0 0 00 4 00 0 0 0 0 0 0 0 0 00 5 00 1 1 261 254 63 391 63 2104452 0b 6 00 1 1 392 254 63 524 63 2136582 07 Expert command (m for help):
Re: Lost partition
Author: sandy
Date: Sun, 25 Feb 2001 19:57
Date: Sun, 25 Feb 2001 19:57
69 lines
3574 bytes
3574 bytes
The partition is still in the partition table and look fine, but you probably over-wrote the boot record at the start of partition /dev/hda5 when you installed the linux boot loader. Therefore, I believe if you write a standard FAT32 boot record back to the beginning of partition /dev/hda5 you may be able to recover the FAT32 filesystem. Before you start playing with /dev/hda5 I suggest you try to make a copy of the partition somewhere else (on /dev/hdb). This may not work because of the bad boot record in /dev/hda5 but try anyhow. First make sure you have gnu "parted" on your distro. If not download from; http://www.gnu.org/software/parted/parted.html Easiest way is to download the boot floppy version from; /gnu/parted/bootdisk directory and then "dd if=partboot.img of=/dev/fd0" to a floppy to make bootable floppy version. See documentation at; http://www.gnu.org/software/parted/USER If you made the floppy boot then insert the floppy and reboot the computer. If you parted is under Linux then boot Linux. Please double check all my commands below. Then run; parted enter commands; select /dev/hdb print Now look and find some space to make a new partition to hold a copy of /dev/hda5. Enter command; mkpart PART-TYPE fat START END PART-TYPE is one of: primary, extended, logical and START, END are the start and end in Mbytes of some free space on /dev/hdb to hold the copy of /dev/hda5 (needs to be about the size of /dev/hda5). Now enter; print Look at the number of the new partition you just created. Now copy /dev/hda5 into the new partition. Enter; cp /dev/hda 5 NUM NUM is the number of the partition on /dev/hdb that you just created Note that the selected drive, /dev/hdb, is the copy-to drive. If this works then reboot and see if Windoze or Linux can use the partition you just copied to on /dev/hdb. Report back the results. Also, report a "ls -l /boot" (the original boot record from /dev/hda5 may be backed up in this directory). Keith
Re: Lost partition
Author: preamp
Date: Mon, 26 Feb 2001 08:02
Date: Mon, 26 Feb 2001 08:02
47 lines
3154 bytes
3154 bytes
Firstly...thanks for all this help. I do appreciate it. <snip good stuff> > > NUM is the number of the partition on /dev/hdb that you just created > Note that the selected drive, /dev/hdb, is the copy-to drive. If this > works then reboot and see if Windoze or Linux can use the partition > I will attempt to copy it as soon as parted finishes downloading. > Also, report a "ls -l /boot" (the original boot record from /dev/hda5 > may be backed up in this directory). > > Meanwhile... my /boot directory contains the following :- [dklock@localhost bootdisk]$ ls -l /boot total 952 lrwxrwxrwx 1 root root 23 Feb 26 16:57 System.map -> System.map-2.2.17-21mdk -rw-r--r-- 1 root root 216464 Oct 5 21:24 System.map-2.2.17-21mdk -rw-r--r-- 1 root root 6132 Oct 3 19:18 boot-menu.b -rw-r--r-- 1 root root 4380 Oct 3 19:18 boot-text.b -rw-r--r-- 1 root root 512 Feb 24 23:03 boot.0345 lrwxrwxrwx 1 root root 11 Feb 24 22:35 boot.b -> boot-menu.b -rw-r--r-- 1 root root 612 Oct 3 19:18 chain.b drwxr-xr-x 2 root root 4096 Feb 24 23:03 grub/ -rw-r--r-- 1 root root 431 Feb 26 16:58 kernel.h -rw------- 1 root root 35328 Feb 24 23:03 map -rw-r--r-- 1 root root 129 Feb 24 23:03 message -rw-r--r-- 1 root root 640 Oct 3 19:18 os2_d.b -rw-r--r-- 1 root root 256 Feb 24 23:03 us-latin1.klt lrwxrwxrwx 1 root root 20 Feb 24 23:03 vmlinuz -> vmlinuz-2.2.17-21mdk -rw-r--r-- 1 root root 665029 Oct 5 21:24 vmlinuz-2.2.17-21mdk Darryl
Re: Lost partition
Author: preamp
Date: Mon, 26 Feb 2001 08:29
Date: Mon, 26 Feb 2001 08:29
14 lines
1894 bytes
1894 bytes
No luck... Both a 'check' and a 'copy' of hda5 result in ... Error: Could not detect file system. So, how do I write a standard FAT32 boot record to it? (or was that boot record in my /boot? I have my doubts about that, as I reinstalled linux a few times as I experimented with various options, so the mistake was probably made on an earlier install - and I never noticed until later) Darryl
Re: Lost partition
Author: Bryce Tanner
Date: Mon, 26 Feb 2001 13:51
Date: Mon, 26 Feb 2001 13:51
43 lines
2783 bytes
2783 bytes
Hi bud I'm assuming that the lost partition had windows 2000 on it. If this is the case, then... Boot from your windows 2000 cd-rom Hit "R" for repair system Select the Repair Console type "help" at the command prompt there should be a command called "bootfix" or "fixboot" or something like that......run it this should rewrite the Windows 2000 bootsector for you after that write the Linux boot loader to the correct volume Bryce "preamp" <preamp@spamblock.dingoblue.net.au> wrote in message news:3a973ada$0$25511$7f31c96c@news01.syd.optusnet.com.au... > > I just installed Mandrake 7.2 and due to (I think) a stupid mistake of > mine, I have lost a FAT32 partition. (no biggie, as it was a > data/application volume only and I have backups of everything that can't be > reinstalled) > > What happened (again I think) is that I told the install to write the boot > manager to /hda5 instead of /hdb5 (where Linux really was). Anyway, now if > I try to mount /hda5 - this is the result... > > [root@localhost /root]# mount /dev/hda5 /mnt/temp -t vfat > mount: wrong fs type, bad option, bad superblock on /dev/hda5, > or too many mounted file systems > > > Windows (2000) thinks it is an unformatted partition. > > Is it gone for good...or it there a way to get it back? > > >
Re: Lost partition
Author: sandy
Date: Mon, 26 Feb 2001 14:49
Date: Mon, 26 Feb 2001 14:49
58 lines
3316 bytes
3316 bytes
"preamp" <preamp@spamblock.dingoblue.net.au> wrote in message news:3a9a135a$0$25468$7f31c96c@news01.syd.optusnet.com.au... > > No luck... > > Both a 'check' and a 'copy' of hda5 result in ... > > Error: Could not detect file system. > > So, how do I write a standard FAT32 boot record to it? (or was that boot > record in my /boot? I have my doubts about that, as I reinstalled linux a > few times as I experimented with various options, so the mistake was > probably made on an earlier install - and I never noticed until later) > There is a backup boot record here; -rw-r--r-- 1 root root 512 Feb 24 23:03 boot.0345 Now is this the time and date that you re-wrote the /dev/hda5 boot record? If yes then; dd if=/boot/boot.0345 of=/dev/hda5 If no, then you can still backup /dev/hda5 before going further using a raw copy command. First make another partition on /dev/hdb that is the SAME size as /dev/hda5 then; cp /dev/hda5 /dev/hdbNUM NUM is the number of the new partition. Now what you want to do is re-write the first 512 bytes of /dev/hda5 with what would normally appear in a FAT32 filesystem. I don't know exactly what is there but if you create another FAT32 filesystem (may need to be the same size) then boot linux and (please check dd argument below because I'm doing from memory, which isn't very good); dd if=/dev/hdbNUM of=/tmp/boot_record bs=512 count=1 bs is block size and count is number of blocks. Check size of file by; ls -l /tmp/boot_record Should be 512 bytes. If everything OK then copy this boot record to /dev/hda5; dd if=/tmp/boot_record of=/dev/hda5 Now reboot and see if /dev/hda5 is OK. Keith
Re: Lost partition
Author: sandy
Date: Mon, 26 Feb 2001 14:57
Date: Mon, 26 Feb 2001 14:57
26 lines
2158 bytes
2158 bytes
"Bryce Tanner" <bryceman@iprimus.com.au> wrote in message news:3a9a5f5e$1@news.iprimus.com.au... > Hi bud > > I'm assuming that the lost partition had windows 2000 on it. If this is the > case, then... > Boot from your windows 2000 cd-rom > Hit "R" for repair system > Select the Repair Console > type "help" at the command prompt > there should be a command called "bootfix" or "fixboot" or something like > that......run it > this should rewrite the Windows 2000 bootsector for you > after that write the Linux boot loader to the correct volume > > Bryce > <snip> I don't beleive this will work unless the partition affected is in what MS calls the "system partition". This is the partition marked with the boot flag in the partition table. Keith
Re: Lost partition
Author: preamp
Date: Tue, 27 Feb 2001 07:23
Date: Tue, 27 Feb 2001 07:23
31 lines
2080 bytes
2080 bytes
Bryce Tanner wrote: > Hi bud > > I'm assuming that the lost partition had windows 2000 on it. If this is > the case, then... No, it wasn't a boot partition at all. Win2k is on /dev/hdb1. > Boot from your windows 2000 cd-rom > Hit "R" for repair system > Select the Repair Console > type "help" at the command prompt > there should be a command called "bootfix" or "fixboot" or something like Yes, I think it is 'fixmbr' > that......run it > this should rewrite the Windows 2000 bootsector for you > after that write the Linux boot loader to the correct volume > > Bryce This works on /dev/hda1 (I know because after trying grub as a bootloader there, I put the Win2K one back again so as not to confuse the other users of this computer :-)) Darryl
Re: Lost partition
Author: preamp
Date: Tue, 27 Feb 2001 08:20
Date: Tue, 27 Feb 2001 08:20
66 lines
3296 bytes
3296 bytes
sandy wrote: > > There is a backup boot record here; > > -rw-r--r-- 1 root root 512 Feb 24 23:03 boot.0345 > > Now is this the time and date that you re-wrote the /dev/hda5 > boot record? > > If yes then; Nope... it was much earlier than this I fear...... > > Now what you want to do is re-write the first 512 bytes of > /dev/hda5 with what would normally appear in a FAT32 > filesystem. I don't know exactly what is there but if you > create another FAT32 filesystem (may need to be the > same size) I did this... /dev/hda6 and I made it identical in size. >then boot linux and (please check dd argument > below because I'm doing from memory, which isn't very > good); It's better than you think :-) > > dd if=/dev/hdbNUM of=/tmp/boot_record bs=512 count=1 > > bs is block size and count is number of blocks. Check size > of file by; > > ls -l /tmp/boot_record > > Should be 512 bytes. Yep...fine. >If everything OK then copy this boot > record to /dev/hda5; > > dd if=/tmp/boot_record of=/dev/hda5 > > Now reboot and see if /dev/hda5 is OK. > > Keith You're brilliant my friend.... it has worked perfectly!!!! I can't thank you enough for the amount of trouble you have saved me. (Although I thought it would be easy to rebuild if we failed, I was wrong. I had Net Nanny installed there, and due to it's protection against interference, it was not going to let me reinstall it anywhere else until I uninstalled the non-existent files. I could not do that because it would not accept the admin password - I think because it could not verify it against the missing data) Anyway, thanks again.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads