Re: Trying do mount a slice containing a r/o mounted partition makes the filesystem unreadable

2021-03-01 Thread Arrigo Marchiori via freebsd-stable
Dear All,

On Sat, Feb 27, 2021 at 04:34:52PM +0100, Arrigo Marchiori via freebsd-stable 
wrote:

> Hello Helge, and thank you for replying again.
> 
> On Sat, Feb 27, 2021 at 03:43:52PM +0100, Helge Oldach wrote:
> 
> > Arrigo Marchiori via freebsd-stable wrote on Sat, 27 Feb 2021 14:00:24 
> > +0100 (CET):
> > > On the memstick, the root filesystem is mounted read-only.  I
> > > apologize, I should have told it explicitly.  The ``invalid'' attempt
> > > is to mount it read-write (no mode is indicated on the command line).
> > 
> > Try to make it r/w mounted (which I suspect you are attempting to
> > achieve):
> > 
> > mount -uw /
> 
> Ok, I will try this.
> 
> But just for the record: I am not try to achieve anything.  I gave the
> ``invalid'' mount command by mistake (I wanted to mount a partition
> from another disk and wrote "da0" instead of "da1") and I saw that the
> system became unstable. I thought that this should not happen and I
> reported it here.

I have two updates.

 1- the da0s2a slice starts 16 (blocks?) after the beginning of da0s2.
bsdlabel(8) output (copied by hand):
# /dev/da0s2:
8 partitions:
#   size offsetfstype[fsize  bsize bps/cpg]
  a: 1491200 164.2BSD 0  0 0
  c: 1491216  0unused 0  0 # "raw" part, don't edit

 2- if I mount the partition rw, then the mount command _always_ fails
 with error "operation not permitted" and the system _always_ remains
 stable. This is independent from mounting from /dev/ufs/label or
 /dev/da0s2a.

Therefore I can change the description of this problem report as:

8<8<8<8<8<8<8<-

When a BSD partition is mounted _read_only_ to / (suppose
/dev/da0s2a), if I try to mount its containing slice (/dev/da0s2) I
receive a ``strange'' error message, and from that moment the mounted
filesystem becomes unreadable.

 - If the partition is mounted from /dev/ufs/label, then mount(8)
reports "Operation not permitted" and the system remains stable.
This is the expected behavior IMHO.

 - If the partition is mounted read_write, from any special device,
   then mount(8) reports:
 - "Operation not permitted" if I try to mount the slice rw,
 - the same strange error message if I try to mount the slice ro,
   and the system remains stable.

 - The "strange error message" is "invalid argument" on 11.4-STABLE.

8<8<8<8<8<8<8<-

Now to the question: is this worth a PR? Was it already reported?  Or
is it just something that ``should not happen'' because root should be
allowed to shoot themselves in the foot?

Thank you in advance and best regards,
-- 
Arrigo

http://rigo.altervista.org
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Freebsd 13.0-BETA*: Asus P9X79-based host not powering down

2021-03-01 Thread Matthieu Volat

Hi,

I am still using a core-i7-3820 CPU on a Asus P9X79 motherboard that works well 
on 13.0 BETA, except that when using "shutdown -p" or "halt" commands, the 
system will reboot instead of powering down.

It worked quite well for as long as I had FreeBSD on this machine (since 10 I 
think?) using UEFI boot and previous BIOS compatibilites disabled, I even 
reinstalled from scratch (mainly to have a bigger EFI partition).

Is there some acpi settings I can play around?

Thanks a lot

-- 
Matthieu Volat 


pgpcpgt2VWpPQ.pgp
Description: OpenPGP digital signature