CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - General Support
  mount bsd/386 partition to recover data

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  severino42
      severino42
mount bsd/386 partition to recover data
#1
Newbie
Joined: 2009/7/4
From
Posts: 3
I need to mount a bsd/386 partition on my hard drive to recover data. I am running the latest CentOS 5.3, downloaded and installed in the last week.

My searches have turned up a mount command, that does not work.

[root@new-host-2 ~]# mount -t ufs -o fstype=444bsd /dev/sda3 /mnt/bsd
mount: unknown filesystem type 'ufs'
[root@new-host-2 ~]# mount /dev/sda3 /mnt/bsd
mount: you must specify the filesystem type
[root@new-host-2 ~]# mount -r -t auto /dev/sda3 /mnt/bsd
mount: you must specify the filesystem type
[root@new-host-2 ~]# uname -a
Linux new-host-2 2.6.18-128.el5xen #1 SMP Wed Jan 21 11:55:02 EST 2009 i686 i686 i386 GNU/Linux


So, is there a patch to get mount -t ufs working?
Is there a patch to get bsd/386 filesystem type?

have not build a kernel before, so I would like to avoid that, but I will attempt it if I have no other options.

Thank you for your time and attention
Posted on: 2009/7/4 18:15
Create PDF from Post Print
Top
  •  skolnick
      skolnick
Re: mount bsd/386 partition to recover data
#2
Regular Board Member
Joined: 2007/11/24
From
Posts: 198
IIRC, the kernel in the CentosPlus repository supports mounting of UFS filesystems. You can install the kernel by doing:

yum install kernel --enablerepo=centosplus

That should install the latest centosplus kernel. You should reboot after installing a new kernel.

Hope this helps. Regards.
Posted on: 2009/7/5 0:30
Create PDF from Post Print
Top
  •  toracat
      toracat
Re: mount bsd/386 partition to recover data
#3
Moderator
Joined: 2006/9/3
From California, US
Posts: 6919
The centosplus kernel does have support for the ufs fulesystem. However, there is now a better solution. The ELRepo project ( http://elrepo.org ) offers a kernel module package for this filesystem. Follow the instructions on the web site to set up this repository and install kmod-ufs by the yum command.
_________________
Useful links: Search Forums, Forum FAQ
Posted on: 2009/7/5 4:25
Create PDF from Post Print
Top
  •  severino42
      severino42
Re: mount bsd/386 partition to recover data
#4
Newbie
Joined: 2009/7/4
From
Posts: 3
Thanks for your help.

Yesterday I did a yum update, so I have all the latest in the CentOS yum repo.

I updated the kernel to centosplus, and the partition did not mount.

I installed elrepo's repo and #yum install kmod-ufs --enablerepo=elrepo , and the partition does not mount

I a using the comand
# mount -t ufs -o ro,ufstype-44bsd /dev/sda3 /mnt/bsd
mount: wrong fs type, bad option, bad superblock on /dev/sda3
...
# dmesg | tail
ufs_read_super: bad magic number

Is it possible that installing CentOS corrupted my bsd partition?

Any other suggestions to get data off this partition? I can re-partition when I get the data. I do not need this partition to stay a bsd partition.
Posted on: 2009/7/6 13:26
Create PDF from Post Print
Top
  •  toracat
      toracat
Re: mount bsd/386 partition to recover data
#5
Moderator
Joined: 2006/9/3
From California, US
Posts: 6919
Quote:

severino42 wrote:

I a using the comand
# mount -t ufs -o ro,ufstype-44bsd /dev/sda3 /mnt/bsd

Was that a typo? It is ufstype=44bsd ( not a dash)

Quote:

Is it possible that installing CentOS corrupted my bsd partition?

If you did not touch the bsd partition during the installation, it should be there intact. How does CentOS recognize the partition? What is the filesystem ID as seen in fdisk -l ? I think FreeBSD is ef.
_________________
Useful links: Search Forums, Forum FAQ
Posted on: 2009/7/6 14:46
Create PDF from Post Print
Top
  •  AlanBartlett
      AlanBartlett
Re: mount bsd/386 partition to recover data
#6
Moderator
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 9135
Quote:
What is the filesystem ID as seen in fdisk -l ? I think FreeBSD is ef.

It should be a5.

Command (m for help): l

 0  Empty           1e  Hidden W95 FAT1 80  Old Minix       bf  Solaris        
 1  FAT12           24  NEC DOS         81  Minix / old Lin c1  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          82  Linux swap / So c4  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  83  Linux           c6  DRDOS/sec (FAT-
 4  FAT16 <32M      40  Venix 80286     84  OS/2 hidden C:  c7  Syrinx         
 5  Extended        41  PPC PReP Boot   85  Linux extended  da  Non-FS data    
 6  FAT16           42  SFS             86  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS       4d  QNX4.x          87  NTFS volume set de  Dell Utility   
 8  AIX             4e  QNX4.x 2nd part 88  Linux plaintext df  BootIt         
 9  AIX bootable    4f  QNX4.x 3rd part 8e  Linux LVM       e1  DOS access     
 a  OS/2 Boot Manag 50  OnTrack DM      93  Amoeba          e3  DOS R/O        
 b  W95 FAT32       51  OnTrack DM6 Aux 94  Amoeba BBT      e4  SpeedStor      
 c  W95 FAT32 (LBA) 52  CP/M            9f  BSD/OS          eb  BeOS fs        
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a0  IBM Thinkpad hi ee  EFI GPT        
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a5  FreeBSD         ef  EFI (FAT-12/16/
10  OPUS            55  EZ-Drive        a6  OpenBSD         f0  Linux/PA-RISC b
11  Hidden FAT12    56  Golden Bow      a7  NeXTSTEP        f1  SpeedStor      
12  Compaq diagnost 5c  Priam Edisk     a8  Darwin UFS      f4  SpeedStor      
14  Hidden FAT16 <3 61  SpeedStor       a9  NetBSD          f2  DOS secondary  
16  Hidden FAT16    63  GNU HURD or Sys ab  Darwin boot     fb  VMware VMFS    
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE 
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep        
1c  Hidden W95 FAT3 75  PC/IX           be  Solaris boot    ff  BBT 
_________________
Alan

100% Unix & Linux. Co-founder of the ELRepo Project.
Posted on: 2009/7/6 15:07
Create PDF from Post Print
Top
  •  toracat
      toracat
Re: mount bsd/386 partition to recover data
#7
Moderator
Joined: 2006/9/3
From California, US
Posts: 6919
Argh, I was looking at the wrong column.

Thanks, Alan, for posting the whole thing.
_________________
Useful links: Search Forums, Forum FAQ
Posted on: 2009/7/6 15:20
Create PDF from Post Print
Top
  •  AlanBartlett
      AlanBartlett
Re: mount bsd/386 partition to recover data
#8
Moderator
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 9135
Quote:
Argh, I was looking at the wrong column.

It's quite a misleading output and potentially dangerous . . .

Logically one expects to read the description of the disk (partition) type and then see the ID to the right of the description.

The command I would use to mount the OP's disk is --

mount -r -t ufs /dev/sda3 /mnt/bsd

-- but there are, as we know, many ways to skin a donkey.
_________________
Alan

100% Unix & Linux. Co-founder of the ELRepo Project.
Posted on: 2009/7/6 15:29
Create PDF from Post Print
Top
  •  severino42
      severino42
Re: mount bsd/386 partition to recover data
#9
Newbie
Joined: 2009/7/4
From
Posts: 3
Yes it is a FreeBSD partition. Does that mean I should use a different mount command?

[root@new-host-2 ~]# fdisk -l

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 11439 12161 5807497+ 7 HPFS/NTFS
/dev/sda3 5802 11438 45272064 a5 FreeBSD
/dev/sda4 14 5801 46492110 5 Extended
/dev/sda5 14 5801 46492078+ 83 Linux

Partition table entries are not in disk order
[root@new-host-2 ~]#
[root@new-host-2 ~]# mount -r -t ufs /dev/sda3 /mnt/bsd
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@new-host-2 ~]#

Thank you for your time and help
Posted on: 2009/7/6 18:01
Create PDF from Post Print
Top
  •  NoSuchUser
      NoSuchUser
Re: mount bsd/386 partition to recover data
#10
Newbie
Joined: 2009/8/10
From
Posts: 1
> Yes it is a FreeBSD partition.

Which version of FreeBSD was used to create the partition?

Recent FreeBSD versions default to creating UFS2 filesystems and IIRC UFS2 file systems are not recognized by the Linux UFS module.

> /dev/sda3 5802 11438 45272064 a5 FreeBSD

/dev/sda3 would be the top-level partition ("slice" in FreeBSD terminology). FreeBSD further divides its top-level partition into file systems; these are usually visible as additional /dev/sdaN device nodes under Linux.

If partition /dev/sda3 contains one or more UFS1 filesystems, then a command such as the following should work:

# mount -t ufs -o ro,ufstype=44bsd /dev/sda8 /mnt

Change "/dev/sda8" above to the appropriate device node name.
Posted on: 2009/8/10 11:40
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com