On 02/15/2016 03:42 PM, Mike Wright wrote:
Hi everybody,
I have several large disks filled with experiments and multiboots. I need to make changes to the current /boot/grub/grub.cfg but I have no idea which one I'm using or which one of the systems' grub config tools were used so I don't dare just grab any old one and use it
I've searched through seven VolumeGroups full of LogicalVolumes and can't seem to find the one I'm using. Also combed through partitions that are not part of LVM.
Does the boot process leave any footprints behind telling where it booted from?
Rapidly losing what little is left of my mind...
You can always "cat /proc/cmdline" to see what the boot command line was. In my case:
[root@prophead ~]# cat /proc/cmdline BOOT_IMAGE=/vmlinuz-4.3.4-200.fc22.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet LANG=en_US.UTF-8
So it booted the 4.3.4-200.fc22.x86_64 kernel (yes, this machine is still F22) and the current /dev/mapper/fedora-root is the root of my filesystem. Digging a bit more:
[root@prophead ~]# ls -l /dev/mapper/fedora-root lrwxrwxrwx. 1 root root 7 Feb 1 15:09 /dev/mapper/fedora-root -> ../dm-1 [root@prophead ~]# ls -l /dev/dm-1 brw-rw----. 1 root disk 253, 1 Feb 1 15:09 /dev/dm-1
So, /dev/mapper/fedora-root is is /dev/dm-1 or device major 253, minor 1. Dig a bit deeper:
[root@prophead ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 931G 0 part ├─fedora-swap 253:0 0 15.6G 0 lvm [SWAP] ├─fedora-root 253:1 0 606.8G 0 lvm / ├─fedora-home 253:2 0 293G 0 lvm /home └─fedora-tmp 253:3 0 15.6G 0 lvm /tmp sdb 8:16 0 465.8G 0 disk └─sdb1 8:17 0 465.8G 0 part /media/500GB-Drive sr0 11:0 1 2K 0 rom
So you can see my boot partition is a plain-old partition on /dev/sda1 and the root filesystem (block device 253:1) is a Linux LVM living on /dev/sda2.
Does that help any? ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - grasshopotomus: A creature that can leap to tremendous heights... - - ...once. - ----------------------------------------------------------------------