help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error: disk lvmid/... not found Entering rescue mode...


From: Jelle de Jong
Subject: Re: error: disk lvmid/... not found Entering rescue mode...
Date: Mon, 20 Jul 2015 12:46:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

On 20/07/15 12:06, Andrei Borzenkov wrote:
> Sorry, you really need to give step by step description what you do.
> Copy-paste of all commands after boot would probably be the best. I
> really do not understand your configuration.

I use an USB stick with debian wheezy /dev/sda to boot an system and
login over ssh.

Then I add two more USB sticks to the system /dev/sdb and /dev/sdc

The bellow is what I do. If I do these steps on an HP Z600 the system
will boot fine, if do this on an HP ML110G7 grub goes to disk not found
(both with grub v1.99 and v2.00) I got the feeling somethings goes wrong
around the mdadm part....

dd if=/dev/zero of=/dev/sdb bs=4M oflag=direct &
dd if=/dev/zero of=/dev/sdc bs=4M oflag=direct &

/sbin/parted --script /dev/sdb \
mklabel msdos \
mkpart primary 8M 100% \
toggle 1 boot \
print

/sbin/parted --script /dev/sdc \
mklabel msdos \
mkpart primary 8M 100% \
toggle 1 boot \
print

mdadm --create /dev/md0 --level=1 --raid-devices=2 --name=md0
--metadata=default /dev/sdb1 /dev/sdc1

pvcreate /dev/md0
vgcreate lvm0-vol /dev/md0

lvcreate --name root --size 7G lvm0-vol
lvcreate --name swap --extents 100%FREE lvm0-vol

mkfs.ext4 -m 1 /dev/mapper/lvm0--vol-root
mkswap /dev/mapper/lvm0--vol-swap -f

mkdir /mnt/debinst
mount /dev/mapper/lvm0--vol-root /mnt/debinst

debootstrap --arch amd64 jessie /mnt/debinst/
http://ftp.uk.debian.org/debian

mount -t proc proc /mnt/debinst/proc/
mount -o bind /dev /mnt/debinst/dev/
mount -o bind /sys /mnt/debinst/sys/
mount -o bind /run /mnt/debinst/run/
mount -t devpts devpts /mnt/debinst/dev/pts

chroot /mnt/debinst /bin/bash
export LC_ALL=C


echo 'deb http://ftp.uk.debian.org/debian jessie main contrib non-free
# deb http://ftp.uk.debian.org/debian oldstable main contrib non-free
# deb http://ftp.uk.debian.org/debian testing main contrib non-free
# deb http://ftp.uk.debian.org/debian unstable main contrib non-free
# deb http://ftp.uk.debian.org/debian experimental main contrib non-free
deb http://security.debian.org/ jessie/updates main
# deb http://security.debian.org/ oldstable/updates main
# deb http://security.debian.org/ testing/updates main' | tee
/etc/apt/sources.list

cat /etc/apt/sources.list


echo "do_initrd = yes" | tee /etc/kernel-img.conf

apt-get install -y vim less bzip2 pciutils bash-completion udev
openssh-server isc-dhcp-client e2fsprogs util-linux busybox
apt-get install firmware-linux-free linux-image-amd64

apt-get install lvm2
apt-get install mdadm

vim /etc/mdadm/mdadm.conf
ARRAY /dev/md0  metadata=1.2 UUID=ce66e84b:84994150:d774f790:461de4ab

update-initramfs -u -k all -v

apt-get install grub-pc

vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="rootfstype=ext4 fsck.mode=force console=ttyS0,115200
rootdelay=6"

GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no
--stop=1"

update-grub

apt-get install linuxlogo

wget --no-check-certificate
https://raw.githubusercontent.com/arvidjaar/bootinfoscript/master/bootinfoscript
apt-get install gawk lzma xz-utils
bash bootinfoscript

mv --verbose /sbin/start-stop-daemon.REAL /sbin/start-stop-daemon
rm /etc/udev/rules.d/70-persistent-net.rules
exit

umount /mnt/debinst/dev/pts
umount /mnt/debinst/{sys,run,dev,proc}
umount /mnt/debinst/
rmdir /mnt/debinst

mdadm --stop -scan
poweroff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]