Results 1 to 7 of 7

Thread: install 42.3 in addition to 42.2, but where should /boot be

  1. #1

    Default install 42.3 in addition to 42.2, but where should /boot be

    Hi,

    I have a simple installation running 42.2, mainly as mail server. This was installed on a PC server with an HP h/w raid. The complete file system sits in a single partition with a single LVM VG with 4 LVs, except for /boot (ext4), which has a separate partition outside the LVM. There has never been a Windows installation on this server, and /boot contains a legacy grub2 boot description. gdisk says that the disk has a "valid GPT with protective MBR; using GPT"

    I now want to install 42.3 in a similar manner on the same disk (there is sufficient space) in a new partition with an additional LVM VG, but I am not sure where the /boot should be during the installation of 42.3:
    a - is /boot for 42.3 to be on different partition from the existing /boot for 42.2, or
    b - should the existing 42.2 /boot be mounted as the /boot for the new 42.3 (of course without reformatting) during installation and will the installation of 42.3 then create a proper new grub.cfg file with menu entries for both 42.2 and 42.3?

    I want to be able to continue running 42.2 until everything works as it should be on 42.3 and then switch the priorities in the grub menu entries.

    Thanks for any reply, Charles

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,288

    Default Re: install 42.3 in addition to 42.2, but where should /boot be

    /boot is were the kernel lives so yes you need a separate boot. The OS could share a LVM or not your choice. Supply more detail such as at least fdisk -l for more help. Generally the last OS installed controls the boot but details depend on if EFI or MBR boot.

    Since you have MBR if you say want to have 42.2 control just reinstall grub from that OS, you can use yast or command line.

  3. #3

    Default Re: install 42.3 in addition to 42.2, but where should /boot be

    Quote Originally Posted by gogalthorp View Post
    /boot is were the kernel lives so yes you need a separate boot. The OS could share a LVM or not your choice. Supply more detail such as at least fdisk -l for more help. Generally the last OS installed controls the boot but details depend on if EFI or MBR boot.

    Since you have MBR if you say want to have 42.2 control just reinstall grub from that OS, you can use yast or command line.
    Thanks for you reply. Below there is output from fdisk, gdisk, /boot and /boot/grub2, from the current 42.2 (which is called stremen6). The partition and LVM for 42.3 (stremen7) has been prepared and is a mirror of stremen6. I may be misunderstanding you but what I want is actually a dual boot system with 42.2 and 42.3 as the 2 options. This server is not continuously on, but switches on and off a couple of times a day automatically. I will only be working intermittently on 42.3. When not working on it, the server should continue to run as usual, that is switching on/off regularly and booting into 42.2 until I have finished all work on 42.3. If I understand you correctly, I would need to reinstall grub every time I want to work on 42.3 and vice versa.

    As the /boot/grub2 directory and grub.cfg contain already 2 different versions of the linux kernel, should it not be possible to have also a mixture of 42.2 and 42.3 kernels in a single grub.cfg?

    Regards, Charles

    Code:
    GPT fdisk (gdisk) version 0.8.8
    
    Partition table scan:
      MBR: protective
      BSD: not present
      APM: not present
      GPT: present
    
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/cciss/c0d0: 71119755 sectors, 33.9 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 567DF013-7149-4F02-8430-01B4E0366193
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 71119721
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 24630088 sectors (11.7 GiB)
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1            2048        22530047   10.7 GiB    8E00
       2        22530048        22939647   200.0 MiB   8300
       3        22939648        46491647   11.2 GiB    8E00  Linux LVM
    
    
    stremen6:~ # fdisk -l
    Disk /dev/cciss/c0d0: 33.9 GiB, 36413314560 bytes, 71119755 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: 567DF013-7149-4F02-8430-01B4E0366193
    
    Device               Start     End   Sectors  Size Type
    /dev/cciss/c0d0p1     2048 22530047 22528000 10.8G Linux LVM
    /dev/cciss/c0d0p2 22530048 22939647   409600  200M Linux filesystem
    /dev/cciss/c0d0p3 22939648 46491647 23552000 11.2G Linux LVM
    
    
    
    
    Disk /dev/mapper/stremen6-root: 6 GiB, 6442450944 bytes, 12582912 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/stremen6-swap: 500 MiB, 524288000 bytes, 1024000 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/stremen6-home: 1 GiB, 1073741824 bytes, 2097152 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/stremen7-root: 6 GiB, 6442450944 bytes, 12582912 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/stremen7-home: 1 GiB, 1073741824 bytes, 2097152 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    Disk /dev/mapper/stremen6-var: 2 GiB, 2147483648 bytes, 4194304 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/stremen6-tmp: 500 MiB, 524288000 bytes, 1024000 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/stremen7-var: 2 GiB, 2147483648 bytes, 4194304 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/stremen7-tmp: 500 MiB, 524288000 bytes, 1024000 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mapper/stremen7-swap: 500 MiB, 524288000 bytes, 1024000 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    stremen6:~ # cd /boot
    stremen6:/boot # ll
    total 58101
    -rw-r--r-- 1 root root       65 Dec 13 23:31 .vmlinuz-4.4.103-18.41-default.hmac
    -rw-r--r-- 1 root root       65 Oct 24 22:58 .vmlinuz-4.4.92-18.36-default.hmac
    -rw-r--r-- 1 root root  3201663 Dec 13 22:47 System.map-4.4.103-18.41-default
    -rw-r--r-- 1 root root  3196436 Oct 24 22:27 System.map-4.4.92-18.36-default
    -rw-r--r-- 1 root root      512 May 23  2017 backup_mbr
    -rw-r--r-- 1 root root     1725 Jul 24 14:07 boot.readme
    -rw-r--r-- 1 root root   178574 Dec 13 22:10 config-4.4.103-18.41-default
    -rw-r--r-- 1 root root   178538 Oct 24 21:58 config-4.4.92-18.36-default
    drwxr-xr-x 7 root root     1024 Dec 18 13:17 grub2
    lrwxrwxrwx 1 root root       28 Dec 18 12:31 initrd -> initrd-4.4.103-18.41-default
    -rw------- 1 root root 12878720 Dec 22 22:50 initrd-4.4.103-18.41-default
    -rw------- 1 root root 12876936 Dec 22 22:52 initrd-4.4.92-18.36-default
    drwx------ 2 root root    12288 May 21  2017 lost+found
    -rw-r--r-- 1 root root   500736 May 21  2017 message
    -rw-r--r-- 1 root root   357170 Dec 13 22:52 symvers-4.4.103-18.41-default.gz
    -rw-r--r-- 1 root root   357145 Oct 24 22:30 symvers-4.4.92-18.36-default.gz
    -rw-r--r-- 1 root root      377 Dec 13 22:52 sysctl.conf-4.4.103-18.41-default
    -rw-r--r-- 1 root root      377 Oct 24 22:30 sysctl.conf-4.4.92-18.36-default
    -rw-r--r-- 1 root root  6916364 Dec 13 22:55 vmlinux-4.4.103-18.41-default.gz
    -rw-r--r-- 1 root root  6896566 Oct 24 22:32 vmlinux-4.4.92-18.36-default.gz
    lrwxrwxrwx 1 root root       29 Dec 18 12:31 vmlinuz -> vmlinuz-4.4.103-18.41-default
    -rw-r--r-- 1 root root  6028984 Dec 13 23:31 vmlinuz-4.4.103-18.41-default
    -rw-r--r-- 1 root root  5902312 Oct 24 22:58 vmlinuz-4.4.92-18.36-default
    
    
    
    stremen6:/boot # cd grub2
    stremen6:/boot/grub2 # ll
    total 25
    drwxr-xr-x 2 root root  1024 Oct  8  2016 backgrounds
    -rw-r--r-- 1 root root    37 May 23  2017 device.map
    drwxr-xr-x 2 root root  1024 May 21  2017 fonts
    -rw------- 1 root root  8396 Dec 18 13:17 grub.cfg
    -rw-r--r-- 1 root root  1024 May 23  2017 grubenv
    drwxr-xr-x 2 root root 10240 May 23  2017 i386-pc
    drwxr-xr-x 2 root root  1024 May 23  2017 locale
    drwxr-xr-x 3 root root  1024 May 21  2017 themes

  4. #4
    Join Date
    Sep 2012
    Posts
    7,105

    Default Re: install 42.3 in addition to 42.2, but where should /boot be

    Quote Originally Posted by fluid_02 View Post
    should it not be possible to have also a mixture of 42.2 and 42.3 kernels in a single grub.cfg?
    Standard scripts used to maintain grub.cfg assume /boot belongs to exactly one OS instance. So yes, it is of course possible, but you would need to either use custom scripts (probably, write them) or manually edit grub.cfg every time kernel is added/removed.

  5. #5

    Default Re: install 42.3 in addition to 42.2, but where should /boot be

    Quote Originally Posted by arvidjaar View Post
    Standard scripts used to maintain grub.cfg assume /boot belongs to exactly one OS instance. So yes, it is of course possible, but you would need to either use custom scripts (probably, write them) or manually edit grub.cfg every time kernel is added/removed.
    Clear! But could /etc/grub.d/40_custom used for this purpose? Or would it actually be possible to chain 2 grub.cfg files using a "source" directive as /etc/grub.d/41_custom seems to be hinting at?

    Charles

  6. #6
    Join Date
    Sep 2012
    Posts
    7,105

    Default Re: install 42.3 in addition to 42.2, but where should /boot be

    Quote Originally Posted by fluid_02 View Post
    Or would it actually be possible to chain 2 grub.cfg files using a "source" directive
    More robust is to install second grub in partition bootsector and simple chainload it. This was you will get exact environment for the second OS. You will get second menu though, some people do not like it.

    Not sure about source (it may be too much), but extracting other menu entries using "extract_entries_source" may actually work. But note that it will actually extract everything, including any os-prober or manual entries, not only normal Linux kernel part.

  7. #7

    Default Re: install 42.3 in addition to 42.2, but where should /boot be

    Quote Originally Posted by fluid_02 View Post
    Clear! But could /etc/grub.d/40_custom used for this purpose? Or would it actually be possible to chain 2 grub.cfg files using a "source" directive as /etc/grub.d/41_custom seems to be hinting at?

    Charles
    It's all far better than I expected. After installation of 42.3 with its own /boot partition, the old 42.2 grub menu entries were already automatically included in the new grub configuration. It was simple to set the boot entry for 42.2 (with yast) as the default. Thanks to all

    Charles

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •