Go Back   DaemonForums > Miscellaneous > Off-Topic

Off-Topic Everything else.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th July 2009
unicyclist unicyclist is offline
Real Name: Mike
Fdisk Soldier
Join Date: May 2008
Location: Alaska
Posts: 54
Default [SOLVED] mbr/pbr question or problem

This may be primarily an OpenBSD question.
I had an extended fat32 partition I used for music files. I moved the files and formatted the partition for ext2fs to install linux. I then added some files to it, but then didn't like the way that distro ran, so I moved the files back to a different partition and formatted the partition to what it was before, fat32.
I thought that would be easier and quicker than deleting everything.
Now, when I boot back into OpenBSD, and mount the partition, it shows the files that were there when it was first fat 32 and used by OpenBSD!
The partition size is the same and shows 2.5 gig used. Only difference is that one old directory now shows as a file, not a directory.
I've basically formatted that partition twice since it was first used bye OpenBSD.
How do I repair it so that OpenBSD shows a blank/clean partition?

Last edited by unicyclist; 16th July 2009 at 01:21 PM.
Reply With Quote
  #2   (View Single Post)  
Old 16th July 2009
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
Join Date: May 2008
Location: USA
Posts: 6,212

I would believe it unlikely for FAT metadata to survive an ext2fs formatting, but it is possible. More likely is a configuration problem of some kind.

You haven't shown us fdisk or disklabel output, but I suspect your foreign MBR partition (fat32, or ext2fs) and your disklabel partition might not cover the exact same sectors. They should. If they don't, you'll need to manually adjust the disklabel to match.

When an OpenBSD disklabel does not exist on a drive, a virtual disklabel is created, and foreign filesystems are assigned partition letters in that virtual disklabel, starting with "i". Once a physical disklabel exists, OpenBSD will not do that for you, so changes in MBR partitions must be manually made to disklabel partitions, in order for them to be used within OpenBSD.

Once your disklabel starting sector and size is confirmed to match the correct MBR partition, you should format appropriately using newfs_msdos(8), which will create an empty FAT12, FAT16, or FAT32 partition.
Reply With Quote
  #3   (View Single Post)  
Old 16th July 2009
unicyclist unicyclist is offline
Real Name: Mike
Fdisk Soldier
Join Date: May 2008
Location: Alaska
Posts: 54

Thanks jggimi for your help. I tried to get on early to edit my post, but you posted first. Sorry you had to spend time on this.
First, disklabel under OpenBSD, cfdisk under Slackware, and whatever program pclinuxos uses, all showed the same partition size. Those are the systems on this 120 gig hd. Only difference is that linux showed the partition as ext2fs (before formatting it back to fat32) and I had to mount the same partition under OpenBSD with mount -t msdos. I could play all the ogg files (about 2 gig of files) just fine under either linux system, but when booting into OpenBSD to play them, I was shown the old fat32 files, and yes I would run #disklabel -p m wd0 to check the size of the mounted partition

All is well now since I did something last night that I've wanted to do for a while. I backed up my OpenBSD system, deleted that partition, deleted an old fat partition that was beside it (held os/2 files), and then installed current! Now, all 3 systems show the same information for the data partition.

I know it all sounds very confusing, but all that really happened is the data partition went from fat32 to ext2fs and then back to fat32. Formatting (to me) is as fast and safer than "rm -Rf /" I don't want to get into the habit of typing something like that.

All is well now. Sorry for the noise.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot problem. Geometry problem? gulanito FreeBSD Installation and Upgrading 0 3rd July 2009 03:03 AM
external drive partition question + fdisk question gosha OpenBSD General 15 15th June 2009 02:00 PM

All times are GMT. The time now is 01:32 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick