#1037238 debian-installer: separate /usr ruins opening a shell in rescue

Package:
debian-installer
Source:
debian-installer
Description:
Debian Installer documentation
Submitter:
tomas k
Date:
2023-06-21 07:33:03 UTC
Severity:
normal
Tags:
#1037238#5
Date:
2023-06-08 23:27:54 UTC
From:
To:
Dear Maintainer,

I'm on a different system than the problem one. For years I have had to boot knoppix
and run a chroot to change a password I've forgotten, because I use a separate usr partition,
and rescue thinks it's the root directory. Butr without etc it's not going to work.

Most recently, I just wanted to install grub from the Debian install DVD, nothing else, but once again,
with separate usr, no root shell. So I tried to go through the install and just skip to install grub,
but it wouldn't allow it, because previous steps were skipped. ThAT FIASCO cost me 4  hours, about  the same amount
of time it would take to fix the rescue system.

My suggestion is, if a user wants a separate usr, to place a hidden flag file in root, the presence of which
informs the system to mount THAT partition AND look in /etc/fstab, and mount usr.

I'd really like this back the way it was, but I realize /bin is now symlinks.

Thanks for all the help.

#1037238#10
Date:
2023-06-09 00:25:08 UTC
From:
To:
tomas k <forensic@wi.rr.com> (2023-06-08):

Hardly. You're starting from a system that requires GRUB to be installed
for some reason. d-i isn't breaking anything at all.

init=/bin/sh works for that.

If rescue doesn't mount all the things automatically, you realize you
can drop to a shell in the installer's context and mount any missing
bit?


Cheers,

#1037238#17
Date:
2023-06-09 11:32:14 UTC
From:
To:
Rescue mode does not "think" anything about any partition. It is up to
the user to select the proper root partition, although I admit this
might be improved by providing more information about available
partitions to the user.

With /usr-merged layout (default since buster IIRC), a separate /usr
must be mounted before running any program. The initramfs mounts a
separate /usr before running init, but the installer rescue mode did not
before running a shell. This feature has been added to bookworm
installer (rescue 1.86) but not backported to bullseye installer AFAIK.

/etc/fstab already exists in the root filesystem, so no need to create a
flag file.

#1037238#22
Date:
2023-06-21 01:55:22 UTC
From:
To:
That explains it. I can't open the root patitiion, because rescue
system says it's not a root partition until I try what is actually
/usr. But, I have finally given up separate /usr, and just lumped it in
with the pile. But in bookworm it should work?

#1037238#27
Date:
2023-06-21 07:22:39 UTC
From:
To:
Bookworm's installer rescue mode should detect a separate /usr in
/etc/fstab and offer to mount it before running a shell in the root
partition, like previous versions already did with a separate /boot or
/boot/efi. Other improvements include properly unmounting nested
filesystems (e.g. /boot/efi then /boot).