View previous topic :: View next topic |
Author |
Message |
Thiemo Tux's lil' helper
Joined: 20 Nov 2002 Posts: 138
|
Posted: Fri May 05, 2017 1:51 pm Post subject: [solved] I am stuck with install of softraid/lvm at grub |
|
|
I started off with https://forums.gentoo.org/viewtopic-t-1061792-highlight-.html but as there is already quite much listing in it making it uneasy to read and I give it another slightly different go, I have opened this thread.
I have started with Gentoo LiveDVD and followed the handbook to install a system with /boot on a softraid partition and the rest on lvm2 partitions.
My partitioning:
Code: | livecd ~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
`-sda1 8:1 0 232.9G 0 part
`-md126 9:126 0 232.9G 0 raid1
sdb 8:16 0 232.9G 0 disk
`-sdb1 8:17 0 232.9G 0 part
`-md126 9:126 0 232.9G 0 raid1
sdc 8:32 0 465.8G 0 disk
|-sdc1 8:33 0 159M 0 part
| `-md123 9:123 0 159M 0 raid1
|-sdc2 8:34 0 160M 0 part
| `-md127 9:127 0 160M 0 raid1 /mnt/gentoo/boot
|-sdc3 8:35 0 160M 0 part
| `-md124 9:124 0 160M 0 raid1
`-sdc4 8:36 0 465.3G 0 part
`-md125 9:125 0 465.3G 0 raid1
|-vg_sata-lv_home 252:0 0 237.8G 0 lvm /mnt/gentoo/home
|-vg_sata-lv_root_1 252:1 0 20G 0 lvm
|-vg_sata-lv_root_2 252:2 0 40G 0 lvm /mnt/gentoo
|-vg_sata-lv_root_3 252:3 0 20G 0 lvm
|-vg_sata-lv_swap 252:4 0 24G 0 lvm [SWAP]
|-vg_sata-lv_tmp 252:5 0 3.5G 0 lvm /mnt/gentoo/tmp
|-vg_sata-lv_var_1 252:6 0 40G 0 lvm
|-vg_sata-lv_var_2 252:7 0 40G 0 lvm /mnt/gentoo/var
`-vg_sata-lv_var_3 252:8 0 40G 0 lvm
sdd 8:48 0 465.8G 0 disk
|-sdd1 8:49 0 159M 0 part
| `-md123 9:123 0 159M 0 raid1
|-sdd2 8:50 0 160M 0 part
| `-md127 9:127 0 160M 0 raid1 /mnt/gentoo/boot
|-sdd3 8:51 0 160M 0 part
| `-md124 9:124 0 160M 0 raid1
`-sdd4 8:52 0 465.3G 0 part
`-md125 9:125 0 465.3G 0 raid1
|-vg_sata-lv_home 252:0 0 237.8G 0 lvm /mnt/gentoo/home
|-vg_sata-lv_root_1 252:1 0 20G 0 lvm
|-vg_sata-lv_root_2 252:2 0 40G 0 lvm /mnt/gentoo
|-vg_sata-lv_root_3 252:3 0 20G 0 lvm
|-vg_sata-lv_swap 252:4 0 24G 0 lvm [SWAP]
|-vg_sata-lv_tmp 252:5 0 3.5G 0 lvm /mnt/gentoo/tmp
|-vg_sata-lv_var_1 252:6 0 40G 0 lvm
|-vg_sata-lv_var_2 252:7 0 40G 0 lvm /mnt/gentoo/var
`-vg_sata-lv_var_3 252:8 0 40G 0 lvm |
I entered chroot with:
Code: | cp -L /etc/resolv.conf /mnt/gentoo/etc && \
mount -t proc /proc /mnt/gentoo/proc && \
mount --rbind /sys /mnt/gentoo/sys && \
mount --make-rslave /mnt/gentoo/sys && \
mount --rbind /dev /mnt/gentoo/dev && \
mount --make-rslave /mnt/gentoo/dev && \
mount --rbind /boot /mnt/gentoo/boot && \
mount --rbind /run/ /mnt/gentoo/run && \
mount --rbind /run/ /mnt/gentoo/run && \
chroot /mnt/gentoo /bin/bash |
and did:
Code: | source /etc/profile && export PS1="(chroot) $PS1" |
My make.conf:
Code: | (chroot) livecd / # grep -vE "^\s*($|#)" /etc/portage/make.conf
CFLAGS="-O2 -pipe -march=native"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
USE="anacron aspell bindist bluray cdparanoia device-mapper g-sorcery gd geoip
geolocation gimp gnupg gpg gphoto2 graphviz hunspell ical imagemagick
imap javamail javascript json kbd kbindicator kdesu konsole kontact
maildir ocr odbc ogg123 opencl openldap openmax openssl opus oracle
orathreads postgres pulseaudio savedconfig smtp v4l v4l2 vim vim-syntax
vlc -dvdr -gnome -gtk -gtk2 -gtk3"
CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
MAKEOPTS="-j2"
LINGUAS="de de_DE de_CH en_GB es_ES"
L10N="de de-DE de-CH en-GB es-ES"
VIDEO_CARDS="intel nvidia vesa"
INPUT_DEVICES="evdev"
GRUB_PLATFORMS="pc" # sort of pc=legecy system without EFI
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://gentoo.imj.fr/pub/gentoo/ rsync://ftp-stud.hs-esslingen.de/gentoo/ http://mirror.bytemark.co.uk/gentoo/ rsync://mirror.bytemark.co.uk/gentoo/ rsync://ftp.snt.utwente.nl/gentoo http://ftp.halifax.rwth-aachen.de/gentoo/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo rsync://mirror.netcologne.de/gentoo/ ftp://ftp.mirrorservice.org/sites/distfiles.gentoo.org/ rsync://mirror.leaseweb.com/gentoo/ http://mirror.netcologne.de/gentoo/ rsync://rsync.gentoo.org/gentoo-portage"
|
I did some extra installation of software.
However, trying to install grub with
Code: | (chroot) livecd / # grub-install /dev/sda
Installing for i386-pc platform.
grub-install: error: failed to get canonical path of `aufs'. |
Some research on the net made me make a df which then showed me my boot on a device simply "aufs".
Code: |
(chroot) livecd / # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_sata-lv_root_2 41022688 15516332 24441396 39% /
/dev/mapper/vg_sata-lv_var_2 41022688 3013504 36944224 8% /var
/dev/mapper/vg_sata-lv_tmp 3546848 7200 3339764 1% /tmp
/dev/mapper/vg_sata-lv_home 244372804 88631264 154727816 37% /home
aufs 6145984 283456 5862528 5% /boot
cgroup_root 10240 0 10240 0% /sys/fs/cgroup
udev 10240 4 10236 1% /dev
shm 6145984 0 6145984 0% /dev/shm
tmpfs 1229200 1172 1228028 1% /run
none 6145984 12 6145972 1% /run/user/1000
/dev/sde4 5448780 1124224 4028060 22% /run/media/gentoo/Gentoo-amd64 |
The same source on the net suggests to remount /boot from within the chroot. So I did
Code: | (chroot) livecd / # umount /boot/ |
Mounting again, however, was not possible.
Code: |
(chroot) livecd / # mount /boot/
mount: /dev/md127 is already mounted or /boot busy
/dev/md127 is already mounted on /boot |
It showed that /boot seemed to be fine then.
Code: | (chroot) livecd / # df /boot
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md127 154501 8986 134052 7% /boot
|
Trying to install grub again fails but with
Code: | (chroot) livecd / # grub-install /dev/sda
Installing for i386-pc platform.
grub-install: error: disk `md127' not found. |
Does somebody know how to handle this? _________________ root ist die wurzel allen uebels
Last edited by Thiemo on Wed May 10, 2017 1:54 pm; edited 1 time in total |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Fri May 05, 2017 2:09 pm Post subject: |
|
|
partition table is msdos?
maybe missing useflags for grub? (device mapper)
not sure where aufs for /boot comes from.
Edit: Oh, you bind the livedvd /boot into your chroot? that can't possibly be right you only do bind for proc sys dev |
|
Back to top |
|
|
Thiemo Tux's lil' helper
Joined: 20 Nov 2002 Posts: 138
|
Posted: Fri May 05, 2017 2:42 pm Post subject: |
|
|
Eek, I finally found a bug report with debian.
Following it, I issued Code: | (chroot) livecd / # mdadm --examine /dev/sda1
/dev/sda1:
Magic : a92b4efc
Version : 1.0
Feature Map : 0x1
Array UUID : f73b6643:8e521d5e:8d84d049:b1d75ba6
Name : any:md_backup
Creation Time : Fri Apr 28 17:24:49 2017
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 488394720 (232.88 GiB 250.06 GB)
Array Size : 244197184 (232.88 GiB 250.06 GB)
Used Dev Size : 488394368 (232.88 GiB 250.06 GB)
Super Offset : 488394736 sectors
Unused Space : before=0 sectors, after=352 sectors
State : clean
Device UUID : 07cd6316:34e2c231:df35a79e:d9dc32ce
Internal Bitmap : -16 sectors from superblock
Update Time : Wed May 3 14:54:25 2017
Bad Block Log : 512 entries available at offset -8 sectors
Checksum : b4c5936 - correct
Events : 1693
Device Role : Active device 0
Array State : AA ('A' == active, '.' == missing, 'R' == replacing) | and Code: | (chroot) livecd / # grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported. | and Code: | grub-install /dev/sdb
Installing for i386-pc platform.
Installation finished. No error reported. |
_________________ root ist die wurzel allen uebels
Last edited by Thiemo on Fri Jun 09, 2017 10:58 am; edited 1 time in total |
|
Back to top |
|
|
Thiemo Tux's lil' helper
Joined: 20 Nov 2002 Posts: 138
|
Posted: Fri May 05, 2017 4:14 pm Post subject: |
|
|
Dooo, just got aware that I was having /boot of the LiveDVD rebound to /mnt/gentoo/boot/!!! After a reboot grub-install worked flawlessly. _________________ root ist die wurzel allen uebels
Last edited by Thiemo on Wed Jun 07, 2017 10:21 am; edited 1 time in total |
|
Back to top |
|
|
Thiemo Tux's lil' helper
Joined: 20 Nov 2002 Posts: 138
|
Posted: Wed May 10, 2017 1:53 pm Post subject: |
|
|
Ok, above mentioned stuff was the cause of the problem. _________________ root ist die wurzel allen uebels |
|
Back to top |
|
|
|