Possible dual-booting with a full-featured live install?

When you run into problems installing MX Linux XFCE
Message
Author
cornelyus7
Posts: 15
Joined: Wed May 22, 2019 7:31 am

Re: Possible dual-booting with a full-featured live install?

#11 Post by cornelyus7 »

Back... couldn't use the laptop on weekend..

So, using gparted just resized sda6, left it to save movies pictures, whatever..
made a new ext4 partition sda7 with 40GB

this is the result

Code: Select all

NAME   FSTYPE   LABEL        UUID                                 MOUNTPOINT
loop0  squashfs                                                   /live/linux
loop1  ext4                  e1852dbd-08d6-4df9-9d29-7f470a57a369 /live/persist-root
loop2  ext4                  963de1be-9032-4ec6-b0cb-1cffc2367ccd /home
sda                                                               
├─sda1 ntfs     Recuperação  90286D97286D7CDA                     
├─sda2 vfat                  E26D-D061                            
├─sda3                                                            
├─sda4 ntfs     Win10        5CD86F42D86F1992                     
├─sda5 ntfs                  E09896229895F76E                     
├─sda6 ntfs     DATA         6AEC1752EC1717C1                     
└─sda7 ext4     antiX-Frugal e1133333-57b9-42e6-ae2f-deec4ae1fe09 /live/boot-dev
sdb                                                               
└─sdb1 vfat     MXLIVE       A67D-55CD                            
sr0       

cornelyus7
Posts: 15
Joined: Wed May 22, 2019 7:31 am

Re: Possible dual-booting with a full-featured live install?

#12 Post by cornelyus7 »

fehlix wrote: Sat Jun 15, 2019 2:49 pm and also post the generated grub.entry file found with /antix..../grub.entry
In the next step we will prepare a Grub install to boot into frugal and winOS. ... :snail:
:puppy:

Code: Select all

menuentry "MX 17.1 (Horizon) Frugal Install" {
    search --no-floppy --set=root --fs-uuid e1133333-57b9-42e6-ae2f-deec4ae1fe09
    linux /antiX-Frugal-4.15.0-1-amd64/vmlinuz bdir=antiX-Frugal-4.15.0-1-amd64 buuid=e1133333-57b9-42e6-ae2f-deec4ae1fe09 quiet nosplash persist_static
    initrd /antiX-Frugal-4.15.0-1-amd64/initrd.gz
}

User avatar
fehlix
Developer
Posts: 10378
Joined: Wed Apr 11, 2018 5:09 pm

Re: Possible dual-booting with a full-featured live install?

#13 Post by fehlix »

cornelyus7 wrote: Mon Jun 17, 2019 6:55 pm

Code: Select all

menuentry "MX 17.1 (Horizon) Frugal Install" {
    search --no-floppy --set=root --fs-uuid e1133333-57b9-42e6-ae2f-deec4ae1fe09
    linux /antiX-Frugal-4.15.0-1-amd64/vmlinuz bdir=antiX-Frugal-4.15.0-1-amd64 buuid=e1133333-57b9-42e6-ae2f-deec4ae1fe09 quiet nosplash persist_static
    initrd /antiX-Frugal-4.15.0-1-amd64/initrd.gz
}
Right, it's GRUB time:
Now when booted into Frugal with the LiveUSB:
As we do not have any other Grub installed we install our own:
Open Terminal:
We need to mount ESP-partition:

Code: Select all

sudo mkdir /mnt/ESP
sudo mount -t vfat /dev/sda2  /mnt/ESP 
-> Install GRUB on the ext4 partition /dev/sda7 "antiX-Frugal"

Code: Select all

sudo grub-install --target=x86_64-efi --bootloader-id=frugal --boot-directory=/live/boot-dev --efi-directory=/mnt/ESP
Now we have a frugal GRUB-efi-bootloader and also an UEFI-menu entry already.
Check GRUB efi-bootloader:

Code: Select all

sudo ls -l /mnt/ESP/EFI/frugal/grubx64.efi
and check UEFI-boot menu entry

Code: Select all

sudo efibootmgr -v
and we have grub installed;

Code: Select all

sudo ls  -al /live/boot-dev/grub
But we are missing Grub-Menu, let's create on:
Start wist just simple one: we take the exiting grub entry, but do add some lines.
Copy the exsting grub.entry

Code: Select all

sudo cp /live/boot-dev/antiX-Frugal-4.15.0-1-amd64/grub.entry /live/boot-dev/grub/grub.cfg
Now edit and adjust a bit the new /live/boot-dev/grub/grub.cfg
by adding two lines

Code: Select all

    insmod part_gpt
    insmod ext2
so it looks like

Code: Select all

menuentry "MX 17.1 (Horizon) Frugal Install" {
    insmod part_gpt
    insmod ext2
    
    search --no-floppy --set=root --fs-uuid e1133333-57b9-42e6-ae2f-deec4ae1fe09
    linux /antiX-Frugal-4.15.0-1-amd64/vmlinuz bdir=antiX-Frugal-4.15.0-1-amd64 buuid=e1133333-57b9-42e6-ae2f-deec4ae1fe09 quiet nosplash persist_static
    initrd /antiX-Frugal-4.15.0-1-amd64/initrd.gz
}
Now close all and reboot, during boot-post when seeing the boot logo press F12 (?) key access UEFI-boot menu and select the frugal entry from the UEFI-boot menu.
.. that's it for now ... :snail:
HTH
:puppy:
EDIT: some typos fixed
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

cornelyus7
Posts: 15
Joined: Wed May 22, 2019 7:31 am

Re: Possible dual-booting with a full-featured live install?

#14 Post by cornelyus7 »

fehlix wrote: Tue Jun 18, 2019 8:16 am Now close all and reboot, during boot-post when seeing the boot logo press F12 (?) key access UEFI-boot menu and select the frugal entry from the UEFI-boot menu.
.. that's it for now ... :snail:
HTH
:puppy:
Done!!! Fantastic.. and thanks for the detailed stuff.. i'll go over them again to try and understand what's really going one..

Just a couple of types on your code if anyone uses it again sometime..

Code: Select all

sudo grub-install --target=x86_64-efi --bootloader-id=frugal --boot-directory=/live/boot-dev --efi-directoy=/mnt/ESP
it's --efi-directory

and

Code: Select all

sudo ls -l /mnt/ESP/frugal/grubx64.efi
it's /mnt/ESP/EFI/frugal/grubx64.efi

User avatar
fehlix
Developer
Posts: 10378
Joined: Wed Apr 11, 2018 5:09 pm

Re: Possible dual-booting with a full-featured live install?

#15 Post by fehlix »

cornelyus7 wrote: Tue Jun 18, 2019 7:02 pm Just a couple of types on your code if anyone uses it again sometime..
..it's --efi-directory
and
.. it's /mnt/ESP/EFI/frugal/grubx64.efi
Well spotted :cool:
Next could be to add some more "stuff" into the grub-menu, e.g. it could look like booting from the LiveUSB,
and also adding boot into WinOS.
in addion we could also put the frugal-efiloader into winOS's own bootmenu, but only if needed, that would be some bcd-commands on the "other" side :alien:
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

cornelyus7
Posts: 15
Joined: Wed May 22, 2019 7:31 am

Re: Possible dual-booting with a full-featured live install?

#16 Post by cornelyus7 »

fehlix wrote: Tue Jun 18, 2019 7:11 pm
cornelyus7 wrote: Tue Jun 18, 2019 7:02 pm Just a couple of types on your code if anyone uses it again sometime..
..it's --efi-directory
and
.. it's /mnt/ESP/EFI/frugal/grubx64.efi
Well spotted :cool:
Next could be to add some more "stuff" into the grub-menu, e.g. it could look like booting from the LiveUSB,
and also adding boot into WinOS.
Yeah, that would be cool.. because right now to boot into windows I have to do F12 (boot options), and choose windows boot manager (just figured it out now..).. since the new "frugal" entry is at the top of boot options, If I don't do F12, it goes straight to grub, which has only one entry.. the mx frugal of course..
Wondering, If the option "windows boot manager is first, it would boot directly into Windows right? And I would need to use F12 everytime I wanted to boot into mx..
the other change is to change grub.cfg and add a new windows entry like you refer...
fehlix wrote: Tue Jun 18, 2019 7:11 pm in addion we could also put the frugal-efiloader into winOS's own bootmenu, but only if needed, that would be some bcd-commands on the "other" side :alien:
:puppy:
Yep, that got me wondering, that there is already a boot partitition made from windows that could be used to add the entry.. but let's not go that "other" side :alien:

User avatar
fehlix
Developer
Posts: 10378
Joined: Wed Apr 11, 2018 5:09 pm

Re: Possible dual-booting with a full-featured live install?

#17 Post by fehlix »

cornelyus7 wrote: Tue Jun 18, 2019 7:50 pm Yeah, that would be cool.. because right now to boot into windows I have to do F12 (boot options), and choose windows boot manager (just figured it out now..).. since the new "frugal" entry is at the top of boot options, If I don't do F12, it goes straight to grub, which has only one entry.. the mx frugal of course..
OK, if frugal grub-menu now works, we can add this to the GRUB boot menu:
Open with your favorite editor to edit as root, e.g within terminal:
using geany

Code: Select all

gksu -s geany /live/boot-dev/grub/grub.cfg
or using featherpad:

Code: Select all

gksu -s featherpad /live/boot-dev/grub/grub.cfg
and add entries below the existing one:

Code: Select all

menuentry "Windows" {
  insmod part_gpt
  insmod fat
  insmod chain
  # ESP UUID
  set uuid=E26D-D061
  set root='hd0,gpt2' 
  search --no-floppy --set=root --fs-uuid $uuid
  chainloader /EFI/MICROSOFT/BOOT/BOOTMGFW.EFI
}

menuentry "UEFI/Bios Firmware Setup" {
  fwsetop
}

menuentry "Reboot" { 
  reboot
}

menuentry "Power Off" { 
  halt
}
If we made all correct, you might be able to boot into Windows (-Bootmanager) from GRUB-menu.
cornelyus7 wrote: Tue Jun 18, 2019 7:50 pm Wondering, If the option "windows boot manager is first, it would boot directly into Windows right? And I would need to use F12 everytime I wanted to boot into mx..
the other change is to change grub.cfg and add a new windows entry like you refer...
In order to make sure frugal's GRUB menu will be selected in cases th UEFI-firmare decidces to re-shuffle the UEFI-NVRAM entries, it is often helpful to place additionally our new frugal EFI-loader into the efiloader fallback position like this:
First mount ESP again (create /mnt/ESP if not exist)

Code: Select all

sudo mkdir /mnt/ESP
sudo mount -t vfat /dev/sda2  /mnt/ESP 
Now copy frugal efiloader into the EFI-fallback position:

Code: Select all

sudo cp /mnt/ESP/EFI/frugal/grubx64.efi /mnt/ESP/EFI/BOOT/BOOTX64.EFI
Sync and clear ESP mount like this

Code: Select all

sudo sync
sudo umount /dev/sda2  
sudo rmdir /mnt/ESP 
Now reboot and check that the new menu entries do work. :happy:
HTH
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

cornelyus7
Posts: 15
Joined: Wed May 22, 2019 7:31 am

Re: Possible dual-booting with a full-featured live install?

#18 Post by cornelyus7 »

Great insights..
frugal is always first, grub menu always appears (at least all attempts) as default..

Was able to add windows and all the other entries into grub menu, so all perfect thanks :)

User avatar
fehlix
Developer
Posts: 10378
Joined: Wed Apr 11, 2018 5:09 pm

Re: Possible dual-booting with a full-featured live install?

#19 Post by fehlix »

cornelyus7 wrote: Wed Jun 19, 2019 6:49 pm Great insights..
frugal is always first, grub menu always appears (at least all attempts) as default..

Was able to add windows and all the other entries into grub menu, so all perfect thanks :)
Just spotted a typo for the menu entry going into the UEFI/BIOS setup:

Code: Select all

menuentry "UEFI/Bios Firmware Setup" {
  fwsetup
}
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

cornelyus7
Posts: 15
Joined: Wed May 22, 2019 7:31 am

Re: Possible dual-booting with a full-featured live install?

#20 Post by cornelyus7 »

nice catch!

Post Reply

Return to “Installation”