0

NOTE; I already did a backup so its ok if I loose data.

I need to set up a dual boot system on baremetal dell server. Must be installed on one hard drive. The hard drive is a RAID 1 of two disks. I created two separate partitions on the RAIDed drive.

Originally only Ubuntu was installed. I shrunk the partition, and made a new file system. Then installed RHEL. RHEL installed the file system as a LVM. Here are their roles now.

ubuntu lvm = /dev/sda1 /dev/sda2 & /dev/sda3
RHEL lvm =   /dev/sda4 & /dev/sda5

However after installing RHEL on the /dev/sda4, I can no longer boot to Ubuntu and the one Dell shot boot selection screen only sees RHEL.

After booting to rhel doing a lsblk I can see /dev/sda3 is still intact, but I am not sure how I can access it. I can only assume I messed something up and the boot loader for Ubuntu OS access.

Is there anyway I can set up a boot selection screen to get to the Ubuntu LVM, and RHEL LVM? Is there anyway I can switch between these systems now?

EDIT: I am editing to add a few answers to questions others have (All commands are being run the RHEL system): The partitions were ext4 but after installing the OS's they are LVMs

[root@localhost ~]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/rhel/swap
  LV Name                swap
  VG Name                rhel
  LV UUID                my3UqB-2evu-HZT6-Jvnn-GKfK-hi47-RVdw0u
  LV Write Access        read/write
  LV Creation host, time localhost, 2022-08-23 16:40:51 -0400
  LV Status              available
  # open                 2
  LV Size                4.00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:1

  --- Logical volume ---
  LV Path                /dev/rhel/home
  LV Name                home
  VG Name                rhel
  LV UUID                os7cjL-DSI2-Rz5z-wRWV-LYfP-tDmG-VayFTE
  LV Write Access        read/write
  LV Creation host, time localhost, 2022-08-23 16:40:52 -0400
  LV Status              available
  # open                 1
  LV Size                <120.31 GiB
  Current LE             30799
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:2

  --- Logical volume ---
  LV Path                /dev/rhel/root
  LV Name                root
  VG Name                rhel
  LV UUID                V0mplL-eCiW-Rt4B-ZKpG-ryht-4AHw-oYCT86
  LV Write Access        read/write
  LV Creation host, time localhost, 2022-08-23 16:40:52 -0400
  LV Status              available
  # open                 1
  LV Size                70.00 GiB
  Current LE             17920
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:0

  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/ubuntu-lv
  LV Name                ubuntu-lv
  VG Name                ubuntu-vg
  LV UUID                NVa00w-MfYG-GQYc-dYKy-1BBZ-gZzC-5y5YDc
  LV Write Access        read/write
  LV Creation host, time ubuntu-server, 2021-05-12 11:01:54 -0400
  LV Status              available
  # open                 0
  LV Size                245.62 GiB
  Current LE             62879
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:3

# file -sL /dev/sd*
/dev/sda:  DOS/MBR boot sector
/dev/sda1: data
/dev/sda2: Linux rev 1.0 ext4 filesystem data, UUID=cf3f54c0-8c15-4d21-86ff-17bdf992731c (extents) (64bit) (large files) (huge files)
/dev/sda3: LVM2 PV (Linux Logical Volume Manager), UUID: dHelg8-yeT9-6MbX-Ww60-kHiB-1e5X-qaWaDA, size: 478483054592
/dev/sda4: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs)
/dev/sda5: LVM2 PV (Linux Logical Volume Manager), UUID: ibSB6r-o56m-tGZj-QgWP-MUCk-dTsE-mO0qov, size: 208641458176
/dev/sdb:  writable, no read permission

The boot partition for RHEL is sda4. User data is sda5. (I edited above sda breakdowns). For Ubuntu, the boot partition might have been sda1 or sda2, user data is on sda3.

Both systems are using BIOS boot.

I can see the logical petitions from RHEL:

# lsblk
NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                         8:0    0 446.6G  0 disk
├─sda1                      8:1    0     1M  0 part
├─sda2                      8:2    0     1G  0 part
├─sda3                      8:3    0 250.3G  0 part
│ └─ubuntu--vg-ubuntu--lv 253:3    0 245.6G  0 lvm
├─sda4                      8:4    0     1G  0 part /boot
└─sda5                      8:5    0 194.3G  0 part
  ├─rhel-root             253:0    0    70G  0 lvm  /
  ├─rhel-swap             253:1    0     4G  0 lvm  [SWAP]
  └─rhel-home             253:2    0 120.3G  0 lvm  /home
sr0                        11:0    1  1024M  0 rom

I can mount sda2 only (which appears to be the boot partition for Ubuntu.) The other paritions I cannot.

~]# find /mnt
/mnt
/mnt/ubuntu_sda3
/mnt/ubuntu_sda1
/mnt/ubuntu_sda2
[root@localhost ~]# sudo mount /dev/sda1 /mnt/ubuntu_sda1
mount: /mnt/ubuntu_sda1: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.
[root@localhost ~]# sudo mount /dev/sda2 /mnt/ubuntu_sda2
[root@localhost ~]# sudo mount /dev/sda3 /mnt/ubuntu_sda3
mount: /mnt/ubuntu_sda3: unknown filesystem type 'LVM2_member'.
[root@localhost ~]# ls /mnt/ubuntu_sda2
config-4.15.0-189-generic  grub                           initrd.img-4.15.0-191-generic  System.map-4.15.0-189-generic  vmlinuz-4.15.0-189-generic
config-4.15.0-191-generic  initrd.img-4.15.0-189-generic  lost+found                     System.map-4.15.0-191-generic  vmlinuz-4.15.0-191-generic

I did find these instructions online for being able to mount sda3, but I am holding off just in case this would mess something up.

5
  • I do not know lvm, but someone that does may want more details: Please copy & paste the pastebin link to the Bootinfo summary report ( do not post report), do not run the auto fix till reviewed.Lets see details, use ppa version with your USB installer (2nd option) or any working install, not Boot-Repair ISO help.ubuntu.com/community/Boot-Repair You do have unique /boot partitions? And both installed in same boot mode, both UEFI or both old BIOS mode?
    – oldfred
    Aug 23, 2022 at 21:26
  • This is confusing. Do you have ext4 file systems on /dev/sda3 and /dev/sda4 or are these lvm volumes? What boot partition is being used? Perhaps /dev/sda1? Is this BIOS or EFI? From RHEL, can you see the logical volumes on /dev/sda3 and can you mount them?
    – doneal24
    Aug 23, 2022 at 21:26
  • @doneal24 I updated my answer to clarify your questions, let me know if you need anything else.
    – Dave
    Aug 24, 2022 at 12:29
  • @oldfred, I am not clear on what your asking, you mention a pastebin link but I dont see one in your comment. Also I dont have access to Ubuntu anymore, so do I need to run boot-repair off a live Ubuntu image?
    – Dave
    Aug 24, 2022 at 12:42
  • If you go to the link on Boot-Repair & run it. It will then offer to run a Boot-Info Summary Report & that will also offer to upload to a pastebin site. Post link into your question above. Click on link & follow directions.Any working Ubuntu and most other Linux will run Boot-Repair. You always need a working live installer for current installed version to make repairs. You can use Boot-Repair's ISO, but it often is not updated as often as ppa.
    – oldfred
    Aug 24, 2022 at 14:56

1 Answer 1

1

I figured it out. There was not much to do since I am using BIOS. I just needed to update the grub bootloader config. It literally added Ubuntu to the grub loading screen automatically.

  1. I updated RHEL (optional)
  2. Updated grub with this command sudo grub2-mkconfig -o /boot/grub2/grub.cfg Doing this I noticed that "Ubuntu 18.04 was found". Note, if you were running a Debian based system and wanted to update grub update-grub does the same thing, just did not have this command in RHEL.
  3. Reboot.
  4. Wait for boot loader screen to appear. Now Ubuntu lines appear. I can select RHEL or Ubuntu, and the OS loads to either.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .