LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Mount UFS filesystem on Ubuntu (https://www.linuxquestions.org/questions/linux-hardware-18/mount-ufs-filesystem-on-ubuntu-895898/)

mikeavison 08-06-2011 08:13 AM

Mount UFS filesystem on Ubuntu
 
Hi I am a non-expert user of Ubuntu 10.04. I've taken a disk out of a tru64 system and intalled it to my PC via an Adaptec AHA-2940uw SCSI card.

When I boot up, Ubuntu finds the partitions on the disk but does not recognise the file system (if I double click them in the computer folder I get the message:

mount: wrong fs type, bad option, bad superblock on /dev/sde3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

I have tried this
sudo mount -t ufs sde3 /mnt/odyssey1

the reply is
special device sde3 does not exist

Any help greatly appreciated! Especially if I can understand it!

Mike

tredegar 08-06-2011 10:02 AM

You need the full path to the partition and the mountpoint:

sudo mount -t ufs /dev/sde3 /mnt/odyssey1

mikeavison 08-07-2011 02:39 AM

Quote:

Originally Posted by tredegar (Post 4435311)
You need the full path to the partition and the mountpoint:

sudo mount -t ufs /dev/sde3 /mnt/odyssey1

Thanks Tredegar but I am afraid it still give the same error when I try that.

I think I must have to download some driver software that allows Ubuntu understand UFS file system?

mikeavison 08-07-2011 02:44 AM

Coorection
 
The error it gives now I am using the right path is the first message in my original post i.e.

mount: wrong fs type, bad option, bad superblock on /dev/sde3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

William (Dthdealer) 08-07-2011 04:08 AM

Your first error is telling you that your system does not currently have the kernel modules to understand the tru64 filesystem. UFS is pretty old and the code has probably been cut to save space, so it will not be included in the kernel by default ( you will have to install it ). Look it up in your package manager.

The error mount is giving you means that you have the wrong device name. Make sure 'sde' is the right device ( perhaps sdc or sdb? ).

Regards, William

mikeavison 08-07-2011 05:08 AM

UFS
 
I couldn't find anything in package manager that looked like it would enable read-write access. Just tools to make partitions and make images of a UFS

Maybe there is a way to recompile the kernel to include UFS but I think that is beyond me.

I think I'll give up on this.

Mike

mikeavison 08-07-2011 05:10 AM

Post Script - what about SUSE
 
I could install SUSE linux on another HDD. Anyone know if SUSE understands UFS???

tredegar 08-07-2011 05:26 AM

ufs is in the kernel of 10.04, but it is compiled as a module. So you need to load the module first.

Try this

Code:

sudo -i
modprobe ufs
mount -t ufs /dev/sde3 /mnt/odyssey1
exit


mikeavison 08-07-2011 12:01 PM

Quote:

Originally Posted by tredegar (Post 4435838)
ufs is in the kernel of 10.04, but it is compiled as a module. So you need to load the module first.

Try this

Code:

sudo -i
modprobe ufs
mount -t ufs /dev/sde3 /mnt/odyssey1
exit


Good try but it still returns the same result.

There was no error or other output as a result of running modprobe ufs, but the mount command still returned the same error.

Mike

mikeavison 08-07-2011 03:48 PM

Hi After all the above, I ran dmesg |tail and got these messages:

[ 19.618280] sd 6:0:0:0: Attached scsi generic sg4 type 0
[ 19.619282] scsi target6:0:0: FAST-20 WIDE SCSI 40.0 MB/s ST (50 ns, offset 8)
[ 19.620656] sd 6:0:0:0: [sde] 8380080 512-byte logical blocks: (4.29 GB/3.99 GiB)
[ 19.623210] sd 6:0:0:0: [sde] Write Protect is off
[ 19.623212] sd 6:0:0:0: [sde] Mode Sense: b3 00 10 08
[ 19.624662] sd 6:0:0:0: [sde] Write cache: disabled, read cache: enabled, supports DPO and FUA
[ 19.629375] sde: sde1 sde2 sde3 sde7
[ 19.640380] sd 6:0:0:0: [sde] Attached SCSI disk
[ 21.597007] eth0: no IPv6 routers present
[ 6330.867118] ufs was compiled with read-only support, can't be mounted as read-write

I do not fully understand them but the last line seems to indicate that I can't get rw access to the disk. Sadly that is what I want.

Is this the end of the road?

tredegar 08-07-2011 04:22 PM

Quote:

... Is this the end of the road?
Of course not :)

If you can read your data, then you can save it somewhere else (perhaps to a better supported filesystem). I suggest that you do this now, if you can.

If you really, really, want to write to this filesystem (and I admit I know nothing about ufs), then the hint is there:
Quote:

[ 6330.867118] ufs was compiled with read-only support, can't be mounted as read-write
So there is probably an option to compile your kernel ufs module with write-support for ufs enabled.

It's not offered, so perhaps support is unreliable. You can probably still compile your kernel to provide support for this, but it may not work, and may break the current partition you have.

So before you try this, or anything else, please make a copy of the existing partition with dd if=/dev/sdwhatever of=image_of_ufs_filesystem.partition
This way, you have a backup file of the original filesystem partition that you can later go back to if you need to.

I am a bit out of my depth here: I have no idea what a "tru64" filesystem is, so I am simply offering you "generic" advice.

At least you have (possibly) managed to get it mounted. Can you read the files there?

Why do you need write access to this partition, and why are you using such an outdated filesystem?

With a lot more information from you, there may be a simpler answer.

Hope this helps, but you need to supply more information, or I am wasting my time.

Best wishes.

mikeavison 08-07-2011 05:02 PM

Sad story
 
Why I need write access to the file system:

While trying to make some changes to the configuration files on a tru4 system (running on a DEC Alpha) I corrupted the fstab file and the full OS would not start up. If I could just edit a couple of lines in the fstab file I could restore it. These systems are somewhat unlike Linux and when some ideot does something like this to them you can still start up in "single user mode". But that is very limited and I was not even able to access vi in it. I am sure it is possible but I am out of my depth with it.

Tru64 was a Unix OS sold by Digital, they later sold it on to Compaq and they to HP (or something like that!)

The machine is a spare donated to me. I have another but this is in a very mission critical machine and I dare not plug this disk into that machine with my feeble grasp of the OS etc.

I thought Linux would easily deal with UFS so I borrowed the scsi adapter and plugged it into my PC running Ubuntu. As you see it did not turn out as easy as I expected.

There are some other alternatives (like asking a guy who has a similar machine which is not doing a mission critical job to plug my disk in his machine and edit the file for me.)

I also have the OS CD which may start up in a maintenance mode (if the CD drive in this elderly machine is working and if I can mount it while I am in single user mode.)

The Ubuntu route is getting too tough for me, it was worth a try. Seeing this: http://wikis.sun.com/display/BigAdmi...ndows+or+Linux makes me feel I am treading on the edge of the known universe and definitely not up to exploring these realms!

So thanks everyone for your guidance. I think I'll activate plan B or C

Mike

tredegar 08-08-2011 11:33 AM

Thanks for the extra explanations, they help me make sense of your problem.

Some further research shows that the ufs module is (usually) compiled without write support. This link explains how to enable write-support with linux, and it seemed to work for him.

If you have problems following the instructions in that thread, we'll be happy to help you.

It would be a very good idea to use dd to take images of your ufs partition(s) before you try writing to them. That way you can always recover to your original position. You do not have to mount the partitions to make copies of them. Again, if you need help with this step, ask.

But perhaps the problem is already solved by other means?


All times are GMT -5. The time now is 01:04 AM.