On Tue, Jul 08, 2008 at 09:19:09AM +0200, Anselm Strauss wrote: > On Jun 28, 2008, at 13:25 , Anselm Strauss wrote: > > >Hi, > > > >originally I had the following labels on my ad0 disk (no partitions, > >directly labeled /dev/ad0): > > > ># /dev/ad0: > >8 partitions: > ># size offset fstype [fsize bsize bps/cpg] > > a: 1048576 0 4.2BSD 1024 8192 46248 > > c: 1048576 0 unused 0 0 # "raw" part, > >don't edit > > > >Since this was written from a file image the my compact flash card, > >and the card has now 8GB instead of 512MB, I wanted to grow the > >labels after having booted the system, and that worked. So now it is: > > > ># /dev/ad0: > >8 partitions: > ># size offset fstype [fsize bsize bps/cpg] > > a: 15662304 0 4.2BSD 1024 8192 46248 > > c: 15662304 0 unused 0 0 # "raw" part, > >don't edit > > > >But unfortunately, I also grew label 'a', although I did not grow > >the filesystem. What I actually wanted was to stay 'a' the size it > >is and add new labels. So I tried to shrink 'a' again, to finally > >have something like: > > > ># /dev/ad0: > >8 partitions: > ># size offset fstype [fsize bsize bps/cpg] > > a: 1048576 0 4.2BSD 1024 8192 46248 > > c: 15662304 0 unused 0 0 # "raw" part, > >don't edit > > > >before adding new labels. But somehow bsdlabel has no effect when > >shrinking 'a'. No error or verbose message, the labels are just the > >same before running it, whether I use the edit mode or restore mode. > > > >Am I not supposed to shrink a label like that? > > > >Cheers, > >Anselm > > > > Okay, this was of course since I tried to resize a partition that is > mounted. I guess this will never work, even when the filesystem > actually already has the size the partition should be shrunk to. I > think there is no other way of resizing the root partition/filesystem > without booting a different system than the one on this partition.
Yes, you have to unmount the partition/filesystem before you can modify its configuration. Just boot the install CD and bring up the fixit. Then you can work on it just fine. Just remember that it may have different device addresses (not necessarily, but might) and that you will need to make mount points if you need to mount anything to muck with files in a partition. Also, note that on a fixit boot, those mount points (and root) are in a memory file system and will be gone after the next boot. I hope you have a good backup of your 'a' partition because it may now not be happy. ////jerry > > Anselm > > _______________________________________________ > firstname.lastname@example.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" _______________________________________________ email@example.com mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"