Page 1 of 1

How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 5:41 am
by piakbt
Hi!

Is it possible to install MX Linux in a way similar to Debian installation via debootstrap?

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 7:03 am
by anticapitalista
Why would you want to do that?

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 8:49 am
by piakbt
I have no access to BIOS, it is password-protected, so I cannot change boot order.
But I have sufficient privileges to configure grub, to partition the disk.

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 9:17 am
by Huckleberry Finn
If it won't be a problem (say, it's your pc and you forgot the password) you know, there're ways to reset that.

Maybe as a workaround, install MX an another machine temporarily (to a tiny partition like 8GB on something external, unchecking and skipping the grub installation) then dd or on GParted copy-paste the partition to un-allocated space (which's just a bit bigger than the partition) ...

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 9:26 am
by chrispop99
Temporarily remove the HDD, and see if it boots from USB. If it does, plug the HDD back in whilst booted. You can then install to the HDD. You may need to mount it as root.

I'm assuming it's a SATA drive, not IDE.

Chris

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 9:31 am
by anticapitalista
Or boot from a cd/dvd if there is one.

So to answer the question, no there is no debootstrap method.
There is a boot fromiso one though.

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 10:22 am
by fehlix
piakbt wrote: Thu Aug 20, 2020 8:49 am I have no access to BIOS, it is password-protected, so I cannot change boot order.
But I have sufficient privileges to configure grub, to partition the disk.
Here are 2-to-3 ways:
You can try to chainload booting from LiveUSB from grub.
On your existing grub menu, press "c" for command line.
First load the chainlaoder:

Code: Select all

insmod chain
list the detect drives:

Code: Select all

ls
if you can identify the LiveUSB (made with MX Live-USB-Maker) , it should have 2 partitions, it may look like

Code: Select all

(hd1) (hd1,gpt1) (hd1,gpt2)
or

Code: Select all

(hd1) (hd1,msdos1) (hd1,msdos2)
hd1 can also be hd0, or even something else.
Now change root, to the first partition on the LiveUSB:

Code: Select all

set root=(hd1,msdos1)
and check the content of the root-folder:

Code: Select all

ls /
You should see the content like

Code: Select all

/antix /boot version made-by-live-usb-maker ...
Now type this to chainload and to boot from the LiveUSB:

Code: Select all

chainloader +1
boot
In case GRUB does not "see" the USB-key yet,
There are two other ways:
Boot from the ISO via GRUB, and install from the running ISOboot. (You might need to put the ISO on a partition not used by the installer.)
Such menentry to ISOboot: e.g. put into /boot/grub/custom.cfg an your existing grub-folder:

Code: Select all

menuentry "MX-19.2_August_x64.iso" {
  insmod ext2
  set isopath="/iso/MX-19.2_August_x64.iso"
  search --no-floppy --file --set=root $isopath
  probe -u $root --set=buuid

  loopback loop $isopath
  linux  (loop)/antiX/vmlinuz buuid=$buuid fromiso=${isopath}  lang=de tz=Europe/Berlin quiet nosplash
  initrd (loop)/antiX/initrd.gz
}
or you can use the magic bootcodes invented by our magician Bitjam :number1:

Code: Select all

blab=MX-Live-USB
to make the MX-Live loader search the USB-partition "MX-Live-usb"
and further boot from the liveUSB:

Code: Select all

menuentry "MX-19.2_August_x64.iso" {
  insmod ext2
  set isopath="/iso/MX-19.2_August_x64.iso"
  search --no-floppy --file --set=root $isopath
  probe -u $root --set=buuid

  loopback loop $isopath
  linux  (loop)/antiX/vmlinuz blab=MX-Live-usb lang=de tz=Europe/Berlin quiet nosplash
  initrd (loop)/antiX/initrd.gz
}
Adjust the timezone and lang parameter accordingly.
Here a working example
/boot/grub/custom.cfg:

Code: Select all

submenu "MX ISO BOOT" {
menuentry "MX-19.2_August_x64.iso" {
  insmod part_gpt
  insmod part_msdos
  insmod ext2
  set isopath="/iso/MX-19.2_August_x64.iso"
  search --no-floppy --file --set=root $isopath
  probe -u $root --set=buuid

  loopback loop $isopath
  linux  (loop)/antiX/vmlinuz buuid=$buuid fromiso=${isopath} kbd=de kbvar=nodeadkeys kbopt=caps:none   lang=de tz=Europe/Berlin quiet nosplash
  initrd (loop)/antiX/initrd.gz
}

menuentry "MX-19.2_KDE_x64.iso" {
  insmod part_gpt
  insmod part_msdos
  insmod ext2
  set isopath="/iso/MX-19.2_KDE_x64.iso"
  search --no-floppy --file --set=root $isopath
  probe -u $root --set=buuid

  loopback loop $isopath
  linux  (loop)/antiX/vmlinuz buuid=$buuid fromiso=${isopath} kbd=de kbvar=nodeadkeys kbopt=caps:none   lang=de tz=Europe/Berlin quiet nosplash
  initrd (loop)/antiX/initrd.gz
}

menuentry "LiveUSB MX-19.2_KDE_x64" {
  insmod part_gpt
  insmod part_msdos
  insmod ext2
  set isopath="/iso/MX-19.2_KDE_x64.iso"
  search --no-floppy --file --set=root $isopath

  loopback loop $isopath
  linux  (loop)/antiX/vmlinuz blab=MX-Live-usb kbd=de kbvar=nodeadkeys kbopt=caps:none   lang=de tz=Europe/Berlin quiet nosplash
  initrd (loop)/antiX/initrd.gz
}

}
EDIT: added insmod part_gpt and insmod part_msdos, so it will work regardless of the current grub.cfg.
HTH
:puppy:

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 11:47 am
by piakbt
Wow! All your help is just amazing, thanks a lot! I'll try to boot from iso.

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 12:29 pm
by j2mcgreg
Wouldn't it just be simpler to reset the bios by removing the CMOS battery, waiting a few minutes and then replacing it?

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 12:35 pm
by piakbt
j2mcgreg, you know, it's a corporate computer, so any hardware manipulation is not an option, unfortunately.

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 12:49 pm
by SwampRabbit
piakbt wrote: Thu Aug 20, 2020 12:35 pm j2mcgreg, you know, it's a corporate computer, so any hardware manipulation is not an option, unfortunately.
If this is a corporate computer, please make sure you have permission to do what you are trying to do, even if its technically possible to do it. The last thing you or anyone else wants is for you to lose your job over something like this, we are also not liable for what you do to your corporate computer.

Re: How to install MX Linux from other Linux? (no USB)

Posted: Thu Aug 20, 2020 1:31 pm
by j2mcgreg
piakbt wrote: Thu Aug 20, 2020 12:35 pm j2mcgreg, you know, it's a corporate computer, so any hardware manipulation is not an option, unfortunately.
In that case, your best and only option is to contact your corporation's I.T. department and make your case as to why you should be allowed to switch from the currently OS to MX. Be prepared to live with what you have if their answer is no.