Web lists-archives.com

Re: Installer Can Not Find Root





On 11/18/2017 07:26 PM, Dan Norton wrote:
> While trying to netinst Debian 8.9 into an LVM physical volume I keep
> running into "installer can not find root" or words to that effect. This
> is a dead end in the installer AFAICT.
> 
> I have tried GPT but this HP UEFI does not play nicely with it. So,
> reverting to Disklabel type: dos, and using fdisk, I re-partitioned.
> 
> fdisk -l reports this snippet (paraphrased):
> 
> /dev/sda1      1M 83 Linux
> /dev/sda2      8G 82 Linux swap
> /dev/sda4  923.5G  5 Extended
> /dev/sda5     64G 8e Linux LVM
> /dev/sda6     64G 8e Linux LVM
> /dev/sda7     64G 8e Linux LVM
> /dev/sda8     64G 8e Linux LVM
> /dev/sda9  667.5G 83 Linux
> 
> The aim here is to have a multiboot system with Debian 8, Debian 9, and
> so forth.
> 
> Using LVM, one physical volume is defined on the entire sda5 partition.
> A volume group named "debian8-vg" is defined as the only vg in that pv.
> Five logical volumes have been defined in the vg. One lv intended as
> root was defined like this with a Debian Live CD:
> 
> user@debian:/$ sudo lvm lvcreate -n root --size 8G debian8-vg  #define
> lv named root
> user@debian:/$ sudo mkfs.ext4 /dev/debian-vg/root  #make a file system
> in lv root
> user@debian:/$ sudo mount /dev/debian-vg/root  #the "/root" was dropped
> apparently
> 
> I was able to cd as follows:
> 
> and to see the logical volumes:
> user@debian:/dev/debian8-vg$ ls
> home root swap_1 tmp var
> 
> There they are. All the logical volumes. Am I getting close? How can I
> "mkdir /" on root and succeed with netinst? BTW I did choose Manual
> partitioning in the installer. :-(
> 
>  - Dan
>

Installing to a PV is a fairly straightforward matter. Here is a worked
out example of installing to a microSD. It should work pretty much the
same for any other type of block device.

Manual partitioning (done on an existing Stretch installation with
gparted) shows the following from fdisk -l:

Device         Boot     Start       End   Sectors  Size Id Type
/dev/mmcblk0p1           2048      4095      2048    1M 83 Linux
/dev/mmcblk0p2           4096   4198399   4194304    2G 82 Linux swap /
Solaris
/dev/mmcblk0p3        4198400 124735487 120537088 57.5G  5 Extended
/dev/mmcblk0p5        4200448  54532095  50331648   24G 8e Linux LVM
/dev/mmcblk0p6       54534144 121643007  67108864   32G 8e Linux LVM
/dev/mmcblk0p7      121645056 124735487   3090432  1.5G 83 Linux

Partitions p5 and p6 are lvm physical volumes.

I also, in emulation, created volume group "debian9-vg" on p5 and a
logical volume "root" on debian9-vg and formatted it as ext4. It mounts
normally on the host and (from a shell prompt) with the installer. I did
not leave it mounted.

The view from the installer partitioner shows essentially the same
thing. From an installer root prompt, lvm commands appear to work
normally, and I created additional LVs swap_1 (2G), tmp (512M), var
(2G), and home (4G), leaving 7.5G free.

>From the installer (partitioner):

All disk partitions, and all LVM logical volumes are shown.

Choosing "Configure the Logical Volume Manager leads to the choice to
format p2 as swap; I did that, and got a frame showing the two PVs (one
used and 1 free), 1 VG, and the 5 LVs and options to "Display
configuration details," "Create volume group," "Create logical volume,"
"Delete logical volume," "Extend volume group," and "Finish."

Display showed the unallocated PV and the debian9-vg with its 5 LVs.
Creating a VG (debian9t) and LVs on partition p6 with the installer
partitioner also works. However, the LVs are created with sizes powers
of 10 instead of 2 (e. g., 1M=1000K=1000000 bytes instead of
1M=1048K=1048576 bytes). I prefer the powers of two, so from a shell
prompt I removed and recreated the LVs on debian9t to match those on the
debian9-vg created earlier.

Note that the partitioning can be done from either another (reasonably
up to date) debian system, including a live CD, I expect, or the
installer, and using either the partitioner or lvm commands from an
installer shell prompt. The partitioner then showed and allowed
configuration of all volume groups and logical volumes. It is necessary
to be careful to not use any partitions, volume groups, or logical
volumes that contain data you want to keep, although the partitioner
will warn about using existing resources.

>From this point, I used the installer partitioner to configure, format,
and specify mount points for LVs associated with the debian9-vg volume
group. The installer correctly identified the root LV, already formatted
as ext4, and offered the option of not reformatting it.

The installation went forward normally, and at stage 1 completion I
chose a relatively local mirror. I did not see the deb.debian.org
redirector listed, which might be a nice thing.

Tom Dial