Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 728816 - Mounting newly created root filesystem from a live environment breaks all commands.
Summary: Mounting newly created root filesystem from a live environment breaks all com...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: InstallCD (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-19 19:03 UTC by William Culhane
Modified: 2020-06-19 19:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Culhane 2020-06-19 19:03:30 UTC
I am trying to install Gentoo from a live environment using the latest minimal 32-bit installation image on an HP Mini 110. I created a 100M boot partition as /dev/sda1, a 2G swap partition as /dev/sda2, and a 147G root partition formatted as ext4 on /dev/sda3. Mounting the root partition proceeds without error, but subsequently every single command except bash builtins are broken. Attempting to reboot with C-Alt-Del fails due to being unable to execute /sbin/shutdown.

Reproducible: Always

Steps to Reproduce:
1. Burn the minimal install image for x86 to a USB flash drive
2. Boot from it
3. Create a partition scheme as described above
4. Optionally activate swap
5. `mount /dev/sda3 /mnt`
6. Type any non-builtin command (e.g. umount, dmesg, or ls).
Actual Results:  
Bash will print a `command not found` message. It is impossible to reboot or perform any task from the environment until the machine is forcibly rebooted. Switching ttys, recreating the live usb, or using a swap partition has no effect. Mounting with `-o ro` has no effect.

Expected Results:  
Either some sort of error message should appear or my commands should still be available. They shouldn't just silently disappear.

I tried putting root on an LVM partition, but it had no effect. Installing alpine linux using the automatic installer suceeded without complaint. Passing absolute paths to where things should be similarly has no effect. Oddly, the error messages do give paths to where the executables should be. Rebooting, and doing nothing except mounting the root partition causes the issue as well. I encountered this issue a few months ago as well (possibly with the same computer).

```
# emerge --info
-bash: emerge: command not found
```
Comment 1 Brian Evans (RETIRED) gentoo-dev 2020-06-19 19:08:03 UTC
(In reply to William Culhane from comment #0)
> I am trying to install Gentoo from a live environment using the latest
> minimal 32-bit installation image on an HP Mini 110. I created a 100M boot
> partition as /dev/sda1, a 2G swap partition as /dev/sda2, and a 147G root
> partition formatted as ext4 on /dev/sda3. Mounting the root partition
> proceeds without error, but subsequently every single command except bash
> builtins are broken. Attempting to reboot with C-Alt-Del fails due to being
> unable to execute /sbin/shutdown.
> 
> Reproducible: Always


> 5. `mount /dev/sda3 /mnt`

This is your problem.  The minimal mounts to /mnt/cdrom or something similar and by you doing 'mount <source> /mnt' you destroy the environment.

The Handbook clearly states that you should do to /mnt/gentoo or really anywhere else new you define under /mnt/ would do.