Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
0
answers
32
views
Missing ufs executable in partclone Linux package
I would like to use partclone on Linux to image an external USB-disk I have formatted with FreeBSD. I am using the Devuan GNU/Linux distribution and I have installed the `partclone` package. The [project's README][1] says that the tool supports the `ufs` filesystem through an executable `partclone.u...
I would like to use partclone on Linux to image an external USB-disk I have formatted with FreeBSD. I am using the Devuan GNU/Linux distribution and I have installed the
partclone
package. The project's README says that the tool supports the ufs
filesystem through an executable partclone.ufs
. The manpage installed on my system confirms this:
ufs | ufs2 partclone.ufs
However, there is no executable partclone.ufs
installed on my system. There is a file
/usr/sbin/partclone.xfs
for xfs but there is no file
/usr/sbin/partclone.ufs
Do you know if it is possible to get this tool from some other source? The documentation I have found on the partclone home page has not helped much so far.
Giorgio
(847 rep)
Jul 12, 2025, 05:27 PM
0
votes
1
answers
479
views
How to replicate the posix acl default on zfs/nfsv4 acl on Solaris?
Suppose I want a dir, which all files and directories created inside has the group permission of the group owner of the dir, and 770 as default permission. With posix ACL is really easy #create a dir.. mkdir proof #inherit group permission "video" in this example chmod g+s proof/ chgrp video proof/...
Suppose I want a dir, which all files and directories created inside
has the group permission of the group owner of the dir, and 770 as
default permission.
With posix ACL is really easy
#create a dir..
mkdir proof
#inherit group permission "video" in this example
chmod g+s proof/
chgrp video proof/
#with setfacl make the default group with rxw permissions
setfacl -d -m g:video:rwx proof
#other are not allowed
setfacl -d -m o:--- proof/
chmod o-x proof
#give the acl
setfacl -m g:video:rwx proof
Now I create a file and a dir inside the dir proof..
mkdir try1
drwxrws---+ 2 myuser video 4,0K feb 23 01:26 try1
touch file1
-rw-rw----+ 1 myuser video 0 feb 23 01:29 file1
As you can see I obtain what I want, all files in the dir
inherit permissions and has the group "video" as group owner.
This is possible on Linux (posix acl on ext4, btrfs, etc..)
and Solaris (ufs).
Now the question..how to do this with zfs which use nfsv4 acl
on Solaris?
I have tried this making another dir "proof" in a zfs Solaris 11 host
(of course chmod g+s was made)
chmod A=owner@:read_attributes/read_data/execute/list_directory/read_data/write_data/append_data/execute/add_file/add_subdirectory:fd:allow,group:video:read_attributes/read_data/execute/list_directory/read_data/write_data/append_data/execute/add_file/add_subdirectory:fd:allow,everyone@:read_attributes/read_data/execute/list_directory/read_data/write_data/append_data/execute/add_file/add_subdirectory:fd:deny proof
but the result is..
mkdir newdir
drwxr-sr-x+ 2 myuser video 2 23 feb 02.33 newdir
:|
How to obtain the same of posix acl? Thanks
elbarna
(13690 rep)
Feb 23, 2023, 12:35 AM
• Last activity: May 20, 2025, 08:06 AM
1
votes
1
answers
4815
views
How to mount a ZFS pool in FreeBSD for cloning
I am in the process of trying to clone a FreeBSD installation onto a new hard drive and need to mount it and then find the mount points in order to proceed with the cloning process. The internal drive that I want to clone to currently has a Windows 10 install and a not very optimised FreeBSD install...
I am in the process of trying to clone a FreeBSD installation onto a new hard drive and need to mount it and then find the mount points in order to proceed with the cloning process.
The internal drive that I want to clone to currently has a Windows 10 install and a not very optimised FreeBSD install that I want to clone over.
I am happy to use the current UFS partition scheme for the FreeBSD.
I will boot from a live FreeBSD USB stick in order to run the appropriate commands. The problem that I am having is that the disk I want to clone from is partitioned using ZFS and I can't get my head round how to mount it and then how to find the mount points.
The disk is connected to my computer using a USB-SATA adapter.
Simon Baldwin
(567 rep)
May 5, 2022, 11:01 AM
• Last activity: Apr 28, 2025, 08:22 PM
1
votes
0
answers
75
views
rsync keeps changing two directories
I am trying to synchronise a directory from a local ext4 filesystem to three FreeBSD ufs filesystems using `rsync`. Here is my setup: - Local machine running GNU/Linux, ext4 filesystem mounted at `/mnt` - Remote machine running FreeBSD 14.1 with three ufs filesystems mounted under `/media/m1`, `/med...
I am trying to synchronise a directory from a local ext4 filesystem to three FreeBSD ufs filesystems using
rsync
. Here is my setup:
- Local machine running GNU/Linux, ext4 filesystem mounted at /mnt
- Remote machine running FreeBSD 14.1 with three ufs filesystems mounted under /media/m1
, /media/m2
, /media/m3
I first sync from local to the first remote disk with:
sudo rsync -auv --delete -A -X --exclude=lost+found \
--rsync-path='sudo /usr/local/bin/rsync' --numeric-ids \
/mnt/ username@hostname:/media/m1/backup
Note that rsync
is running with root privileges both on the local and on the remote machine. Also, on the FreeBSD machine the filesystems are mounted with the acls
option:
sudo mount -o acls -t ufs ...
so the rsync
option -A
should work correctly.
After running rsync once (no errors reported), I ran it a second time and expected that no changes would be reported. However, during the second run, two folders were logged as if they had been changed again:
sending incremental file list
backup/folder/subfolder1/
backup/folder/subfolder2/
No matter how often I run the command, the two subfolders are always listed. It looks as if rsync
tries to set some attributes on the folders but does not succeed.
Interestingly, when I try to synchronise the folders between the mounted ufs filesystems on the remote machine, e.g. with
sudo rsync -auv --delete -A -X --numeric-ids /media/m1/backup/ /media/m2/backup
I get the same behaviour: during the first run, all the files from the original folder are listed; during the subsequent runs, the same two directories are reported again and again:
sending incremental file list
backup/folder/subfolder1/
backup/folder/subfolder2/
It is as if rsync
is trying to change something, fails without reporting an error, and tries over and over again. Bottom line: my backup copies are different from the original.
Do you have an explanation of this behaviour or some hints as to
what should I look at to solve this problem?
**EDIT**
Thanks to Kusalananda for the hint. I have run rsync
again with the -i
option. The changes are now displayed as follows:
sending incremental file list
.d.......a. backup/folder/subfolder1/
.d.......a. backup/folder/subfolder2/
where the d
means that a directory is being synchronised, and a
means that the ACL for that entry is being modified.
So I looked at the ACLs for both directories on the source and target system. On the source (GNU/Linux) machine I have:
$ sudo getfacl -n subfolder1
# file: subfolder1
# owner: 1001
# group: 1001
user::rwx
group::r-x
other::r-x
while on the target (FreeBSD) machine I have
$ sudo getfacl -n subfolder1
# file: subfolder1
# owner: username
# group: username
user::rwx
group::r-x
other::r-x
The only difference I can see is that the owner and group are resolved on the target system (1001 is user username
and 1001 is group username
) while on the source system there are no user or group 1001, so the numeric values are displayed.
Since I have the same problem between two disks on the FreeBSD system, I also ran:
sudo rsync -au -i --delete -A -X --numeric-ids /media/m1/backup/ /media/m2/backup
and got
sending incremental file list
.d.......a. backup/folder/subfolder1/
.d.......a. backup/folder/subfolder2/
Querying the ACLs on the m2
filesystem gives the same result:
$ sudo getfacl -n subfolder1
# file: subfolder1
# owner: username
# group: username
user::rwx
group::r-x
other::r-x
In case this is relevant, here are the rsync versions I am using:
- GNU/Linux: rsync version 3.2.7 protocol version 31
- FreeBSD: rsync version 3.3.0 protocol version 31
Giorgio
(847 rep)
Dec 29, 2024, 12:40 PM
• Last activity: Jan 1, 2025, 10:05 PM
10
votes
4
answers
29355
views
Mount FreeBSD UFS from logical partition under Linux
How can I mount the FreeBSD UFS boot partition under Ubuntu in this setup: - a single HDD which contains - an MBR partition table which contains - some primary Linux partitions and an extended partition which contains - a Linux logical partition and a FreeBSD logical partition which contains - the F...
How can I mount the FreeBSD UFS boot partition under Ubuntu in this setup:
- a single HDD which contains
- an MBR partition table which contains
- some primary Linux partitions and an extended partition which contains
- a Linux logical partition and a FreeBSD logical partition which contains
- the FreeBSD disklabel (so the logical partition is the "slice") which contains
- the FreeBSD boot (UFS) and swap partitions
Here is the MBR partitioning:
ubuntu$ sudo fdisk -l /dev/sda
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders, total 83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005d5af
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1953791 975872 83 Linux
/dev/sda2 1953792 11718655 4882432 83 Linux
/dev/sda3 11718656 13672447 976896 82 Linux swap / Solaris
/dev/sda4 13674494 83884031 35104769 5 Extended
/dev/sda5 13674496 33204223 9764864 83 Linux
/dev/sda6 33206272 83884031 25338880 a5 FreeBSD
And here is the disklabel:
freebsd$ disklabel /dev/ada0s6
# /dev/ada0s6:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 48580592 16 4.2BSD 0 0 0
b: 2097152 48580608 swap
c: 50677760 0 unused 0 0 # "raw" part, don't edit
I can boot FreeBSD using the following
/etc/grub.d/40_custom
:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "FreeBSD" {
insmod part_bsd
insmod ufs2
set root="(hd0,msdos6,bsd1)"
kfreebsd /boot/kernel/kernel
set kFreeBSD.acpi_load=YES
set kFreeBSD.hint.acpi.0.disabled=0
set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada0s6a
kfreebsd_loadenv /boot/device.hints
}
That way I can access the FreeBSD partition from grub2 with no problems. But Linux does not detect any BSD partitions:
ubuntu$ ls /dev/sda*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda5 /dev/sda6
Versions: Ubuntu 14.04 with kernel 4.2.0-27-generic on x86_64, FreeBSD 10.3 RELEASE amd64, both fresh installs.
not-a-user
(1657 rep)
Apr 12, 2016, 10:23 AM
• Last activity: Oct 2, 2024, 07:42 PM
0
votes
0
answers
321
views
gpart device busy trying to remove partition
The situation is the following: ```sh # lsblk DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT da0 0:92 36G GPT - - -:- 33M - - - da0p3 0:95 1.0G freebsd-swap gpt/swapfs - -:- 37G - - - md0 0:106 4.0G ufs - / ``` I want to delete da0p3. So I try that: ```sh # gpart delete -i 3 da0 gpart: Device busy ``` Ok, may...
The situation is the following:
# lsblk
DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
da0 0:92 36G GPT - -
-:- 33M - - -
da0p3 0:95 1.0G freebsd-swap gpt/swapfs -
-:- 37G - - -
md0 0:106 4.0G ufs - /
I want to delete da0p3. So I try that:
# gpart delete -i 3 da0
gpart: Device busy
Ok, maybe I need to turn off swap?
# swapoff /dev/da0p3
swapoff: /dev/da0p3: Invalid argument
So swap is already turned off. Maybe it is mounted somewhere?
# mount
/dev/md0 on / (ufs, local, soft-updates)
devfs on /dev (devfs)
Looks like it also isn't mounted. At this point I have no clue how to delete this partition. Any ideas?
I am running FreeBSD 14.1. I moved the filesystem to a RAM disk so I could delete the current filesystem and re-do it.
Jomy
(121 rep)
Sep 13, 2024, 09:56 AM
1
votes
1
answers
371
views
Does guestmount sypport ufs?
I am trying to use `guestmount` to inspect/modify a FreeBSD .qcow2 image (I saw several answers here, but I found nothing actually solving my problem). I am working under Debian Sid. Apparently image is correctly recognized: ``` mcon@cinderella:~/projects/LXD$ guestfish -a /home/mcon/VirtualBox\ VMs...
I am trying to use
guestmount
to inspect/modify a FreeBSD .qcow2 image (I saw several answers here, but I found nothing actually solving my problem).
I am working under Debian Sid.
Apparently image is correctly recognized:
mcon@cinderella:~/projects/LXD$ guestfish -a /home/mcon/VirtualBox\ VMs/FreeBSD-13.2-RELEASE-amd64.qcow2
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: ‘help’ for help on commands
‘man’ to read the manual
‘quit’ to quit the shell
> run
> list-filesystems
/dev/sda1: unknown
/dev/sda2: vfat
/dev/sda3: unknown
/dev/sda4: ufs
>
but mount fails badly:
mcon@cinderella:~/projects/LXD$ guestmount -a /home/mcon/VirtualBox\ VMs/FreeBSD-13.2-RELEASE-amd64.qcow2 -m /dev/sda4 --rw -o subtype=ufs2 /mnt
libguestfs: error: mount_options: mount exited with status 32: mount: /sysroot: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.
dmesg(1) may have more information after failed mount system call.
guestmount: ‘/dev/sda4’ could not be mounted.
guestmount: Did you mean to mount one of these filesystems?
guestmount: /dev/sda1 (unknown)
guestmount: /dev/sda2 (vfat)
guestmount: /dev/sda3 (unknown)
guestmount: /dev/sda4 (ufs)
I did some variations and I also tried recompiling the whole package from sources, but result is the same.
What am I missing?
Note: I cannot use qemu-nbd
and sudo mount -t ufs -o ufstype=ufs2 /dev/nbd0p4 /mnt/
because ufs.ko
kernel module is compiled without write support.
ZioByte
(910 rep)
Jul 16, 2023, 07:24 AM
• Last activity: Jul 19, 2024, 03:21 PM
-1
votes
1
answers
91
views
Is FreeBSD's UNIX Filesystem (UFS) best suited having a microSD storage?
Is FreeBSD's UNIX Filesystem (UFS) best suited having a microSD storage? I have a Raspberry Pi SOC and microSD is where my FreeBSD is installed and at the same time, storage of my database data and other files.
Is FreeBSD's UNIX Filesystem (UFS) best suited having a microSD storage? I have a Raspberry Pi SOC and microSD is where my FreeBSD is installed and at the same time, storage of my database data and other files.
ordinary_guy
(29 rep)
Feb 2, 2024, 02:18 PM
• Last activity: Feb 2, 2024, 08:00 PM
-1
votes
1
answers
54
views
How are data organized when written in the Micro SD cards?
How are data organized when written in the Micro SD cards as there are no mechanical spinning platters like hard disks?
How are data organized when written in the Micro SD cards as there are no mechanical spinning platters like hard disks?
ordinary_guy
(29 rep)
Feb 2, 2024, 03:29 AM
• Last activity: Feb 2, 2024, 07:34 AM
0
votes
0
answers
1177
views
How to Mount freebsd-ufs USB Correctly to Transfer Files from One FreeBSD 12.1 computer to Another with 13.1
My Second Post. The First One Led to This Present One. I am moving from FreeBSD 12.1 on one computer to FreeBSD 13.1 on another computer. All of my desired files are placed in one directory. This is a simple job with nothing fancy; all that I want to do is copy one directory with subdirectories cont...
My Second Post. The First One Led to This Present One.
I am moving from FreeBSD 12.1 on one computer to FreeBSD 13.1 on another computer. All of my desired files are placed in one directory.
This is a simple job with nothing fancy; all that I want to do is copy one directory with subdirectories containing files onto the USB from the old system and then copy the same from the USB after I have created the new system.
The procedure followed below was done on the FreeBSD-12.1-RELEASE version. I cannot do anything on the 13.1-RELEASE until I copy my files from the former because the former is what is being replaced by the latter.
1. I bought a PNY 256-GB 3.0 USB Backward-Compatible USB.
2. INITIALISATION.
I attached the USB to the computer.
/: cd dev
/dev: gpart show
// The new USB drive appears as da1. In the past, such drives have usually appeared as da0.
/dev: gpart destroy -F dev/da0
/dev: gpart create -s mbr dev/da0
/dev: gpart create -s gpt da1
/dev: gpart add -t freebsd-ufs da1
// This command creates da1/p1.
/dev: newfs -U /da1p1
// This takes several minutes to create cylinder blocks.
// To verify.
/dev: gpart show da1
// This reveals that the bulk of the USB is freebsd-ufs and a tiny part is reserved for adminitrative purposes, so to speak.
// Just to be sure:-
/dev: gpart show da1
// This gives the same information as /dev: gpart show da1.
2. MOUNTING.
// To ascertain if this USB was mounted:-
/dev: df
// This USB did not appear, so I removed it from the computer, which let me know that the guest had departed.
// I then attached the USB to the computer again, and it was recognised as an unmounted guest, so to speak.
// Then:-
/dev: cd /
/: mount -t ufs dev/da1 media/USB
// And the message spat back
No such file dev/da1
/: mount -t freebsd-ufs dev/da1 media/USB
// And the message spat back
No such file dev/da1
// I then tried
/: mount -t freebsd-ufs dev/da1p1 media/USB
// And the message spat back
No such file dev/da1p1
// I then tried
/: mount -t ufs dev/da1p1 media/USB
// And the message spat back
No such file dev/da1p1
// Because ufs is the default, I then tried
/: mount dev/da1 media/USB
// And the message spat back
No such file dev/da1
// I then made the final attempt
/: mount dev/da1p1 media/USB
// And the message spat back
No such file dev/da1p1
3. SCREAMING.
Having devoted the entire day to hunting for a solution, man ages, FreeBSD Handbook, this site, and other sites, I give up.
I have never had this kind of trouble in ten years of mounting ufs USB's.
Perhaps one of you kind souls will know what may be wrong.
user531990
Jul 4, 2022, 03:33 AM
• Last activity: Aug 3, 2022, 04:31 PM
6
votes
3
answers
7426
views
Resizing UFS /root partition on FreeBSD
Is there a way to resize a UFS /root partition while running OS which resides on it? I am running FreeBSD.
Is there a way to resize a UFS /root partition while running OS which resides on it? I am running FreeBSD.
RadioTransmission
(63 rep)
Nov 18, 2016, 02:57 PM
• Last activity: Jan 6, 2022, 04:25 PM
0
votes
0
answers
75
views
How can mount freebsd disk partition with read and write permission in deban?
My freebsd installed on /dev/sdb2,it can mount with read permission: sudo mkdir /mnt/freebsd sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdb2 /mnt/freebsd How can mount it with read and write permission then? sudo mount -rw -t ufs -o ufstype=ufs2 /dev/sdb2 /mnt/freebsd mount: /mnt/freebsd: /dev/sdb2 i...
My freebsd installed on /dev/sdb2,it can mount with read permission:
sudo mkdir /mnt/freebsd
sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdb2 /mnt/freebsd
How can mount it with read and write permission then?
sudo mount -rw -t ufs -o ufstype=ufs2 /dev/sdb2 /mnt/freebsd
mount: /mnt/freebsd: /dev/sdb2 is write-protected but explicit read-write mode requested.
showkey
(499 rep)
Jul 21, 2021, 02:06 AM
0
votes
1
answers
1255
views
I'm out of space on /var. How do I resize and move a UFS partition?
I was upgrading FreeBSD packages as part of a minor version upgrade and I ran out of space on `/var/cache/pkg`. Now I need to - shrink `/usr` - move `/usr` and `/tmp` - grow `/var` Is this possible with FreeBSD? If I've understood what I've read so far, I *should* be able to shrink `/usr` with `grow...
I was upgrading FreeBSD packages as part of a minor version upgrade and I ran out of space on
/var/cache/pkg
. Now I need to
- shrink /usr
- move /usr
and /tmp
- grow /var
Is this possible with FreeBSD? If I've understood what I've read so far, I *should* be able to shrink /usr
with growfs -s /dev/ada0p6
but I have no idea how to relocate the partitions. (It would be easy with gparted, but the manual says gparted can't modify UFS partitions.)
Can anyone give me a step-by-step to do this, or do I need to bite the bullet and do a wipe-and-reinstall? Thanks.
Darwin von Corax
(287 rep)
Feb 25, 2021, 04:58 AM
• Last activity: Feb 26, 2021, 09:16 PM
3
votes
1
answers
5636
views
How to mount ufs file system under Debian testing?
In order to mount my `/dev/sda4` under `/mnt/ufs_mount` on Debian Testing , i have tried the following commands (it works fine under Debian Jessie): modprobe ufs mount -r -t ufs -o ufstype=ufs2 /dev/sda4 /mnt/ufs_mount and: mount -t ufs -o ufstype=ufs2 /dev/sda4 /mnt/ufs_mount But i get this error:...
In order to mount my
/dev/sda4
under /mnt/ufs_mount
on Debian Testing , i have tried the following commands (it works fine under Debian Jessie):
modprobe ufs
mount -r -t ufs -o ufstype=ufs2 /dev/sda4 /mnt/ufs_mount
and:
mount -t ufs -o ufstype=ufs2 /dev/sda4 /mnt/ufs_mount
But i get this error:
mount: /dev/sda4 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sda4,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
The output of: dmesg | tail
:
[ 1136.965142] ufs: ufs_fill_super(): bad magic number
[ 1255.758946] ufs: ufs_fill_super(): bad magic number
[ 2098.945757] ufs: ufs was compiled with read-only support, can't be mounted as read-write
[ 2098.946045] ufs: You didn't specify the type of your ufs filesystem
mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
>>>WARNING 2500), lowering kernel.perf_event_max_sample_rate to 79750
**Edit**
My sources.list
:
deb http://httpredir.debian.org/debian/ stretch main
deb-src http://httpredir.debian.org/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main
And uname -a
:
Linux debian 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux
How to mount ufs
file system under Debian testing?
GAD3R
(69486 rep)
Sep 9, 2016, 06:38 PM
• Last activity: Dec 12, 2020, 02:19 PM
1
votes
0
answers
423
views
Mounting an old Sun CDROM on Linux (Debian Buster)
I have an old CDROM of media content that will have been intended for use on a Sun Unix machine. The CD packaging gives no details of the filesystem type etc. beyond- `mount -o ro /dev/sr0 /cdrom` Obviously this command was for a Sun workstation. I want to read the disk contents (which are mostly vi...
I have an old CDROM of media content that will have been intended for use on a Sun Unix machine. The CD packaging gives no details of the filesystem type etc. beyond-
mount -o ro /dev/sr0 /cdrom
Obviously this command was for a Sun workstation. I want to read the disk contents (which are mostly video files I believe), if they look useful I will probably copy them back out to an ISO format disk.
On my Debian 10.0 (Buster) Linux machine, the simple mount command suggested (changing /cdrom to /mnt as the mount point) fails with the error-
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error.
I have checked the CD FStype with file -s /dev/sr0
which gives this result-
/dev/sr0: Unix Fast File system [v1] (big-endian), last mounted on /mnt, last written at Mon Aug 31 14:56:42 1992, clean flag 1, number of blocks 51660, number of data blocks 50838, number of cylinder groups 7, block size 8192, fragment size 8192, minimum percentage of free blocks 0, rotational delay 0ms, disk rotational speed 73rps, SPACE optimization
This indicates the disk FS is the "Unix Fast Filesystem", which should be supported by the UFS kernel module. I do have UFS available-
cat /proc/filesystems | grep ufs
ufs
However mount -t ufs -o ro /dev/cdrom /mnt
gives the same error. I'm wondering if it's the endian-ness issue (SPARC being big-endian while X86 is little-endian) but I haven't found a mount option to deal with that. I have found some sources on the net that say that Linux can handle filesystems with either endianness. Maybe it should be auto-detected, but if so that's not woerking.
I would welcome suggestions on how to read this disk (or even just convert it to a readable format).
Incans
(41 rep)
Sep 6, 2020, 08:36 PM
4
votes
3
answers
74951
views
How to resolve e2fsck Superblock problem?
I have a problem like this question [https://unix.stackexchange.com/questions/404019/how-disk-became-suddenly-write-protected-in-spite-configuration-is-read-write][1] And I used these commands to resolve that ` umount /dev/sdb1 e2fsck /dev/sdb1 mount /dev/sdb1 ` but ~# e2fsck /dev/sdb1 e2fsck 1.44.5...
I have a problem like this question
https://unix.stackexchange.com/questions/404019/how-disk-became-suddenly-write-protected-in-spite-configuration-is-read-write
And I used these commands to resolve that
`
umount /dev/sdb1
e2fsck /dev/sdb1
mount /dev/sdb1
`
but
~# e2fsck /dev/sdb1
e2fsck 1.44.5 (15-Dec-2018)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdb1
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
or
e2fsck -b 32768
/dev/sdb1 contains a ufs file system
additional commands to help you to know additional details
~#nano /etc/fstab
UUID=###951671### /DATA ufs defaults 1 2
mkdir /DATA
mount /DATA
~# ls -lat | grep DATA
drwxr-xr-x 5 root root 1024 May 26 11:37 DATA
~# df -h | grep sd
/dev/sda1 276G 8.7G 254G 4% /
**/dev/sdb1 197G 102G 80G 57% /DATA**
~# lsblk -f | grep sd
sda
├─sda1 ext4 ###-c0fb-42ce-9c78-### 253.2G 3% /
├─sda2
└─sda5 swap ###-27b4-485b-98b3-### [SWAP]
sdb
└─sdb1 ufs ###951671### 79.3G 52% /DATA
~:/DATA# ls
ls: reading directory '.': Input/output error
~:/DATA# mount -o rw,remount /dev/sdb1
mount: /DATA: mount point not mounted or bad option.
~# umount /DATA
~# e2fsck /DATA
e2fsck 1.44.5 (15-Dec-2018)
e2fsck: Is a directory while trying to open /DATA
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
or
e2fsck -b 32768
~# mount /DATA
mount: /DATA: WARNING: device write-protected, mounted read-only.
At all, I would like to access to this hard /dev/sdb1 in /DATA folder
How can I resolve this problem?
Red Science
(341 rep)
Oct 14, 2019, 12:31 PM
• Last activity: Apr 24, 2020, 03:54 AM
1
votes
0
answers
481
views
How to access a UFS2 formatted drive in OSX/High Sierra?
I found this [guide][1] and I was able to successfully compile the ufs executable. I already have OSXFUSE because I needed it earlier for accessing ext4 partitions. I was able to successfully run the ufs command using: ./ufs --dmg /dev/disk7s1 --type ufs /Users/myuser/Documents/my-mount-point If I r...
I found this guide and I was able to successfully compile the ufs executable.
I already have OSXFUSE because I needed it earlier for accessing ext4 partitions.
I was able to successfully run the ufs command using:
./ufs --dmg /dev/disk7s1 --type ufs /Users/myuser/Documents/my-mount-point
If I run:
df -h
the UFS2 partition shows up and the total size, used space and remaining space are correctly identified. **My problem is that I cannot see any of the files.**
Running:
ls /Users/myuser/Documents/my-mount-point
gives me:
ls: /Users/myuser/Documents/my-mount-point: no such file or directory
**Any ideas how this can be done using free/opensource tools?**
Thanks
mrjayviper
(2253 rep)
Feb 9, 2019, 12:31 PM
• Last activity: Feb 9, 2019, 12:37 PM
0
votes
1
answers
1080
views
UFS2 file system in FreeBSD - reliability in case of recovering from power outages?
I am planning a bare metal installation of FreeBSD 12-rc3 in my desktop with 6GB DDR3 non-ECC RAM and core i3-2120 based system. My concern is in a rare case of power failure, how well UFS2 will work? Is it as easy as running fsck on an ext4 file system in Linux, for example? ZFS is confusing for me...
I am planning a bare metal installation of FreeBSD 12-rc3 in my desktop with 6GB DDR3 non-ECC RAM and core i3-2120 based system. My concern is in a rare case of power failure, how well UFS2 will work? Is it as easy as running fsck on an ext4 file system in Linux, for example?
ZFS is confusing for me, as a desktop user. Firstly, no ECC RAM. Since I am going to dual boot with Linux, I cannot give a whole disk to auto-create ZFS pool and related.
What will work best in my case? Will ZFS keep hard drive activity high resulting in HDD life? The author of FreeBSD books Greg Lehey hinted, he will stick with UFS2 only. Will anyone guide me, I have created free space in the hard drive. I have to use gpart to create the ZFS or UFS2 file system and manually complete the tasks. But, for an average user, is ZFS really needed? and will UFS2 fsck reliable in case of power failures.
Number79
(39 rep)
Dec 1, 2018, 07:17 PM
• Last activity: Dec 2, 2018, 12:12 AM
1
votes
2
answers
1205
views
How many times is the disk accessed?
This is regarding [generic UFS][1]. From what I understand when an absolute path is given (eg: `/home/userU/file.txt`) the disk is accessed for each directory and the file. Hence in this case the disk is accessed 4 times 1 For `/`, 1 for `home/`, 1 for `/userU`, 1 for `file.txt` My questions are 1....
This is regarding generic UFS .
From what I understand when an absolute path is given (eg:
/home/userU/file.txt
) the disk is accessed for each directory and the file. Hence in this case the disk is accessed 4 times
1 For /
, 1 for home/
, 1 for /userU
, 1 for file.txt
My questions are
1. If a hard link /hL
is given, pointing to the inode of the above file, in what order is the disk accessed?
2. If a soft link /sL
is given, pointing to the above file, in what order is the disk accessed?
Assume that no inodes or any other data are cached initially in all three cases.
Nht_e0
(43 rep)
Jul 30, 2018, 02:33 AM
• Last activity: Jul 30, 2018, 08:13 PM
3
votes
1
answers
154
views
Booting FreeBSD alongside Linux
I want to install FreeBSD alongside my Debian, Arch and Kali installs, but I'm having problem creating a bootable USB. I followed the instructions given in the BSD handbook, but my PC doesn't recognise the USB during boot process. I tried $ chainloader (hd0)/boot/boot1.efi $ boot at the grub prompt...
I want to install FreeBSD alongside my Debian, Arch and Kali installs, but I'm having problem creating a bootable USB. I followed the instructions given in the BSD handbook, but my PC doesn't recognise the USB during boot process. I tried
$ chainloader (hd0)/boot/boot1.efi
$ boot
at the grub prompt but it gave an error which says something like 'zfs couldn't find pool;ufs couldn't find slice; can not load loader.efi;'
loader.efi
is also in the (hd0)/boot
directory. Do I need to format the USB drive as USB or ZFS prior to image burning, or do I need to format the partitions on which I'm going to install BSD as UFS or ZFS?
My laptop is an HP-15ac650tu.
These are the two images I used, the result was same both times:
ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/11.0/FreeBSD-11.0-RELEASE-amd64-disc1.iso.xz
ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/11.0/FreeBSD-11.0-RELEASE-amd64-dvd1.iso.xz
NOTE: I have read the other threads with similar names, and they do not mention the error I'm getting.
saga
(1411 rep)
Oct 16, 2016, 07:35 AM
• Last activity: Oct 20, 2016, 01:27 PM
Showing page 1 of 20 total questions