Re: Broken Partition
On Sun, May 03, 2009 at 06:26:42PM -0700, Chris Chambers wrote: Hi, Using partition magic, I freed some space from my msdos partition. Then using sysinstall's fdisk and label, I attempted to add the space to my freebsd partition. I broke the installation. The boot loader can not find /boot/kernal. I tried mounting the partition under FixIt, but mount says broken argument. Any ideas? The loader wont be able to find /boot/kernal but /boot/kernel it might stand a chance ;) No idea if this is your problem; it might just be a typo in your post. Regards, -- Frank Contact info: http://www.shute.org.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Broken Partition
On Sun, May 03, 2009 at 06:26:42PM -0700, Chris Chambers wrote: Hi, Using partition magic, I freed some space from my msdos partition. Then using sysinstall's fdisk and label, I attempted to add the space to my freebsd partition. I broke the installation. The boot loader can not find /boot/kernal. I tried mounting the partition under FixIt, but mount says broken argument. You cannot just slab it on the side of an existing slice with fdisk. You have to create a brand new slice that uses up all the space. There is something called growfs(8) in FreeBSD, but that works on FreeBSD filesystems (FreeBSD partitions) rather than slices. So, you might be able to use the fixit to go back and restore the slice to the way it was and get a backup of it. I am not sure. Do you have any information on exactly which sector it previously started on? You would have to create a slice _identical_ to the old one (without any extra added on) and then use fdisk and bsdlabel to restore the labels _exactly_ as before. Then you might be able to read stuff. I am not sure what fsck would do with it because some links probably have been wiped out. If you can get it to where dump(8) can make a dump of the each of the partitions in the slice (except swap and /tmp - don't back up swap or bother with /tmp), then do that. Then, go back to Partition Magic and delete the FreeBSD slice and then create a completely new one that combines the space of what you shaved off from MSdos with the previous FreeBSD slice. Then you can go back to sysinstall (or manually with fdisk-bsdlabel-newfs) and create the new, larger FreeBSD slice, divide it in to partitions and make file systems out of them with newfs. I think you will be extremely lucky if you can pull off rescuing the old FreeBSD slice though. You will have to get it to start on the same sector and have identical links. You might have to use backup superblocks that are built in to the filesystems if you can get to them. This probably stems from a misunderstanding on how slices, partitions and filesystems work. Although most everything is flexible, the beginnings of each are rather fixed and cannot be arbitrarily shoved around without being remade from scratch. jerry Any ideas? Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Broken Partition
It is best to include the list in all replies, so that people other than the original responder can offer additional help and so people searching the list archives in the future will have a complete picture. Also, not top-posting (putting replies in the context of the original message) is is preferred on this and many other lists. I've reformatted your message and added comments inline below. On Monday 04 May 2009 04:18:37 am Chris Chambers wrote: On Sun May 03 John Nielsen wrote: On Sunday 03 May 2009 09:26:42 pm Chris Chambers wrote: Using partition magic, I freed some space from my msdos partition. Then using sysinstall's fdisk and label, I attempted to add the space to my freebsd partition. I broke the installation. The boot loader can not find /boot/kernal. I tried mounting the partition under FixIt, but mount says broken argument. When you say add the space to my freebsd partition what exactly did you do? Sorry, what I meant by add the space to my freebsd partition was: I created the free space, giving me: ad0s1 ad0s2 Free Space ad0s3 I deleted and recreated ad0s3 in fdisk. Inside the label tool, I added swap space and mounted the remaining on / (as before). You forgot to say I made a backup. If you really skipped that step then hopefully you'll remember next time.. Did you write down the original values from fdisk and bsdlabel? Putting them back may be your best bet for recovery. I would avoid using _any_ swap until you have your data back. If your new free space had been _after_ the FreeBSD slice on the disk you may have had better luck. Since you moved the _beginning_ of your slice that changed the relative offsets of everything else which is probably why your filesystem is broken (I am not a UFS expert). What is surprising is that the loader ran at all... unless you used bsdlabel -B or similar. If you revert the fdisk and bsdlabel values, save your data and want to try again a safer approach would be to define a fourth slice to occupy the free space (yes it will be out of order but FreeBSD shouldn't care.. not sure about DOS or PartitionMagic). Then just use the slice as additional swap directly (no bsdlabel, just ad0s4). But do make a backup this time. What device nodes are listed for your disk from the fixit environment? Currently, the devices are: ad0s1 - DOS, type 7 ad0s2 - DOS, type 7 ad0s3 ad0s3a - UFS ad0s3b - Swap ad0s3c - ? The c partition is the raw partition and is always the same size as the underlying device (or should be). I don't know that it's used for much any more, but there are historical reasons it's there. I would settle for the ability to mount the drive so that I could retrieve a few files. Try reverting the fdisk and bsdlabel values (see above). JN ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Broken Partition
Hi, Using partition magic, I freed some space from my msdos partition. Then using sysinstall's fdisk and label, I attempted to add the space to my freebsd partition. I broke the installation. The boot loader can not find /boot/kernal. I tried mounting the partition under FixIt, but mount says broken argument. Any ideas? Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Broken Partition
On Sunday 03 May 2009 09:26:42 pm Chris Chambers wrote: Using partition magic, I freed some space from my msdos partition. Then using sysinstall's fdisk and label, I attempted to add the space to my freebsd partition. I broke the installation. The boot loader can not find /boot/kernal. I tried mounting the partition under FixIt, but mount says broken argument. When you say add the space to my freebsd partition what exactly did you do? What device nodes are listed for your disk from the fixit environment? JN ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Broken partition table
Hello! My partition table is messed up. I have a 150 gigabyte S-ATA hard drive, with a single NTFS partition running Windows XP. I've been running gpart /dev/ad0 for the last 14 hours now and it's not saying anything. I just want to get my data back. I don't care if I have to reinstall everything. How it all came about is a long story. I ran a second hard disk drive, with FreeBSD, and GRUB so it could do my dual booting. But I needed the space, so I formatted it to NTFS from Windows XP. That's it really, after that, it wouldn't boot. Couldn't load NTLDR. That's when I tried a lot of different things. boot0cfg, fixmbr and fixboot. I even managed changing its system ID type to FAT using fdisk -- I wasn't thinking clearly -- I was in deep shock. I have also tried gpart from Knoppix, but all its guesses came out as zero. I've also tried running gpart from Insert, another Linux distribution, but it totally freaked out about some I/O stuff. Linux uses SCSI drivers for S-ATA though. Is my only choice now to keep running gpart, even if it will run forever? All suggestions welcome, please! Best regards, Kyrre ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
broken partition table
Hi all. Please also reply to my mailbox as I'm not on the list. Thank you. I was installing a new drive on my 5.2.1-p3 and I believe I made some mistake while using fdisk and bsdlabel.. in fact the partition table for my bootable disk has changed. this was my fdisk amrd0 before: web.dti.supsi.ch# cat fdisk.amrd0 *** Working on device /dev/amrd0 *** parameters extracted from in-core disklabel are: cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 71007237 (34671 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED and this is how it looks now.. web.dti.supsi.ch# fdisk amrd0 *** Working on device /dev/amrd0 *** parameters extracted from in-core disklabel are: cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 0, size 70766325 (34553 Meg), flag 0 beg: cyl 0/ head 0/ sector 1; end: cyl 308/ head 254/ sector 63 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED as you can see, it is no longer bootable, and it doesn't start at sect 63 like before but at 0 How can I fix it? I was about to give the following command but thought I'd better ask first here... web.dti.supsi.ch# fdisk -B -f fdisk.conf.amrd0 I expect the above to reinstall the boot code and to correct the partition table.. I expect I'll be able to give that command while the system and running and so the filesystem mounted. also.. with the -t option the results are almost identical to the original state, but end cyl is different.. See.. is that important? web.dti.supsi.ch# fdisk -t -B -f fdisk.conf.amrd0 *** Working on device /dev/amrd0 *** fdisk: WARNING line 2: number of cylinders (4420) may be out-of-range (must be within 1-1024 for normal BIOS operation, unless the entire disk is dedicated to FreeBSD) parameters extracted from in-core disklabel are: cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) Information from DOS bootblock is: 1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 71007237 (34671 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 323/ head 254/ sector 63 2: UNUSED 3: UNUSED 4: UNUSED and here is the fdisk.conf.amrd0 file web.dti.supsi.ch# cat fdisk.conf.amrd0 # values extacted from old fdisk.amrd0 g c4420 h255s63 p 1 165 63 71007237 p 2 0 0 0 p 3 0 0 0 p 4 0 0 0 a 1 -- Roberto Nunnari -software engineer- mailto:[EMAIL PROTECTED] Scuola Universitaria Professionale della Svizzera Italiana Dipartimento Tecnologie Innovative http://www.dti.supsi.ch SUPSI-DTI Via Cantonaletel: +41-91-6108561 6928 Mannofax: +41-91-6108570 Switzerland (o o) ===oOO==(_)==OOo ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]