Persistent Frugal Install on existing internal HDD  [Solved]

When you run into problems installing MX Linux XFCE
Message
Author
User avatar
Pino
Posts: 17
Joined: Fri Mar 19, 2021 9:55 am

Persistent Frugal Install on existing internal HDD

#1 Post by Pino »

Hello, I am trying to make a persistent frugal install on an internal HDD and have 3 questions.

I already tested and successfully created a frugal install via the Live Medium Boot Screen (Customize Boot) with the settings "from=usb" and "f_static_root".

Here is a quick overview
- version: Linux MX-19.3 x64
- Laptop with Windows 7
- internal HDD that has 2 partitions, C: and D:
- C: contains Windows 7 and programs
- D: is my storage partition that contains general files/media

My goal
- using MX Linux as persistent LiveUSB, so that everytime I put in the USB stick it starts MX Linux and all changes during the session are saved
- that's why I want to use the frugal option as using an internal HDD is a lot faster than using the USB flash drive
- use the internal disk partition D: as the frugal disk

Question 1
The files of the frugal install are saved to the internal D:\ drive. How can I keep them in a specific path/folder (such as D:\MXLinux)? As there are 3 different files/folders that are created (antix folder, liveusb folder, swap file), it would be nice to have them all together in one place.

Question 2
After creating the frugal install and booting into MX Linux, the D: drive is no longer listed under Devices in the File Manager (C: is listed though). How can I access the files in D:\?

Question 3
Now everytime I boot into MX Linux via LiveUSB, it's searching for the antix-frugal label, as I don't want to rename the label for my D: drive ( I'm unsure wheather it will cause issues on Windows or if the D: drive will be renamed there). I need to select the D: drive manually each time. How can this step be skipped, so it automatically boots to Linux MX?

Quick System Info

Code: Select all

System:    Host: <filter> Kernel: 4.19.0-12-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0 
           parameters: BOOT_IMAGE=/antiX/vmlinuz quiet splasht nosplash tz=Europe/Berlin 
           from=usb f_static_root 
           Desktop: Xfce 4.14.2 tk: Gtk 3.24.5 info: xfce4-panel wm: xfwm4 dm: LightDM 1.26.0 
           Distro: MX-19.3_x64 patito feo November 11  2020 base: Debian GNU/Linux 10 (buster) 
Machine:   Type: Laptop System: LENOVO product: 7505 v: Lenovo IdeaPad N581 serial: <filter> 
           Chassis: type: 10 v: Lenovo IdeaPad N581 serial: <filter> 
           Mobo: LENOVO model: Product Name v: Mainboard version serial: <filter> UEFI: LENOVO 
           v: 5ECN42WW(V4.01) date: 03/14/2013 
Battery:   ID-1: BAT1 charge: 2.8 Wh condition: 2.8/4.0 Wh (69%) volts: 12.0/10.8 
           model: LG PABAS0241231 type: Li-ion serial: <filter> status: Full 
CPU:       Topology: Dual Core model: Intel Core i5-3230M bits: 64 type: MT MCP arch: Ivy Bridge 
           family: 6 model-id: 3A (58) stepping: 9 microcode: 15 L2 cache: 3072 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 20752 
           Speed: 1197 MHz min/max: 1200/3200 MHz Core speeds (MHz): 1: 1197 2: 1197 3: 1197 
           4: 1197 
           Vulnerabilities: Type: itlb_multihit status: KVM: Vulnerable 
           Type: l1tf mitigation: PTE Inversion 
           Type: mds 
           status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass status: Vulnerable 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, STIBP: disabled, RSB filling 
           Type: srbds status: Vulnerable: No microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel 3rd Gen Core processor Graphics vendor: Lenovo driver: i915 v: kernel 
           bus ID: 00:02.0 chip ID: 8086:0166 
           Display: x11 server: X.Org 1.20.4 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel Ivybridge Mobile v: 4.2 Mesa 18.3.6 compat-v: 3.0 
           direct render: Yes 
Audio:     Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Lenovo 
           driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:1e20 
           Sound Server: ALSA v: k4.19.0-12-amd64 
Network:   Device-1: Qualcomm Atheros AR8161 Gigabit Ethernet vendor: Lenovo driver: alx 
           v: kernel port: 2000 bus ID: 01:00.0 chip ID: 1969:1091 
           IF: eth0 state: down mac: <filter> 
           Device-2: Qualcomm Atheros AR9485 Wireless Network Adapter vendor: Lenovo 
           driver: ath9k v: kernel port: 2000 bus ID: 02:00.0 chip ID: 168c:0032 
           IF: wlan0 state: down mac: <filter> 
Drives:    Local Storage: total: 481.05 GiB used: 34.0 MiB (0.0%) 
           ID-1: /dev/sda vendor: Seagate model: ST500LT012-9WS142 size: 465.76 GiB block size: 
           physical: 4096 B logical: 512 B speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> 
           rev: LVM1 scheme: MBR 
           ID-2: /dev/sdb type: USB vendor: Intenso model: Alu Line size: 15.29 GiB block size: 
           physical: 512 B logical: 512 B serial: <filter> rev: 8.07 scheme: MBR 
Partition: ID-1: / raw size: N/A size: 476.2 MiB used: 34.0 MiB (7.2%) fs: overlay 
           source: ERR-102 
Sensors:   System Temperatures: cpu: 43.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian buster-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian buster main contrib non-free
           2: deb http://deb.debian.org/debian-security buster/updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://ftp.halifax.rwth-aachen.de/mxlinux/packages/mx/repo/ buster main non-free
           No active apt repos in: /etc/apt/sources.list.d/various.list 
Info:      Processes: 205 Uptime: 1m Memory: 3.76 GiB used: 502.5 MiB (13.1%) Init: SysVinit 
           v: 2.93 runlevel: 5 default: 5 Compilers: gcc: 8.3.0 alt: 8 Shell: quick-system-in 
           running in: quick-system-in inxi: 3.0.36 
Last edited by Pino on Sat Mar 20, 2021 3:30 am, edited 3 times in total.
Lenovo IdeaPad N581; Intel i5-3230M; 500GB HDD; Intel HD Graphics 4000; 1x 4GB DD3L RAM

User avatar
entropyfoe
Posts: 639
Joined: Thu Apr 19, 2007 11:42 am

Re: Persistent Frugal Install on existing internal HDD

#2 Post by entropyfoe »

Pino,
Welcome to MX Linux forum. You can find some real experts here that can help if you put in the efforts.
I am not an expert on the frugal installs, but I will give you my take until the experts weigh in.

For #2
Question 2
After creating the frugal install and booting into MX Linux, the D: drive is no longer listed under Devices in the File Manager (C: is listed though). How can I access the files in D:\?
I think you go to MX button in the lower left, select the system menu. There there is a disk manager. You will have to supply a root password. There you can check a box next to the D drive partition. After that it should auto mount. A nice little MX tool to manage your data drives. I have to do this on every new install (though non-frugal) to automatically mount my data drive.
Question 3
Now every time I boot into MX Linux via LiveUSB, it's searching for the antix-frugal label, as I don't want to rename the label for my D: drive. I need to select the D: drive manually each time. How can this step be skipped, so it automatically boots to Linux MX?
Here I am less sure...maybe there is a way to specify that drive using a UUID. Or maybe the answer to question 2 will take care of it. Not sure about question 1.
MX 23.6 AHS on Asus PRIME B650
Ryzen 9700X (16 threads @ 3.8 GHz)
64 Gig DDR4 6400 (Crucial)
Integrated Radeon graphics
Samsung 970 NVMe nvme0n1 P1-3=MX-23.5, P4=testing
Samsung 980 NVMe =2TB Data, plus 4TB WD =backups
on-board ethernet & sound

User avatar
baldyeti
Posts: 734
Joined: Sat Dec 05, 2009 3:37 pm

Re: Persistent Frugal Install on existing internal HDD

#3 Post by baldyeti »

you can specify the persistence partition and folder using the "bdev" (or "blab") and "bdir" cheatcodes.
Last edited by baldyeti on Sat Mar 20, 2021 6:58 am, edited 1 time in total.

User avatar
Pino
Posts: 17
Joined: Fri Mar 19, 2021 9:55 am

Re: Persistent Frugal Install on existing internal HDD

#4 Post by Pino »

Thanks entropyfoe for the welcome :)

When I checked the Disk Manager I noticed something strange. Here is what it shows:

Image Image

First, none of the entries were checked, even though there are 4 entries in the File Manager which I can access them from. Secondly, there are 3 entries for sda3 (the D: partition) of the type "fuseblk". I then checked all 3 sda3 entries. Now there is only 1 new entry in the File Manager under Devices called "Live-usb-storage", but it can't be opened (selecting it does nothing, no authorization prompt or such).

I assume there is supposed to be an entry for sda3 of the type "ntfs" and the mount point "/media/..." just like the sda2 drive (the C: partition), but due to the frugal files being stored on sda3 it's not showing up.
Last edited by Pino on Sat Mar 20, 2021 3:18 am, edited 3 times in total.
Lenovo IdeaPad N581; Intel i5-3230M; 500GB HDD; Intel HD Graphics 4000; 1x 4GB DD3L RAM

User avatar
Pino
Posts: 17
Joined: Fri Mar 19, 2021 9:55 am

Re: Persistent Frugal Install on existing internal HDD

#5 Post by Pino »

baldyeti wrote: Fri Mar 19, 2021 6:20 pm you can specify the persistence partition and folder using the dev" (or "blab") and "bdir" cheatcodes.
I had no success with the cheat codes, I must be using them wrong. These are the steps I made:

- boot up to Windows 7
- there is already a frugal folder in D:\ I created earlier named "antiX-Frugal-4.19.0-12-amd64"
- I move this folder to a subfolder "MXLinux"
- the path to the frugal install is now D:\MXLinux\antiX-Frugal-4.19.0-12-amd64
- in D:\ there are also 2 other files: the "swap-file" and the "Live-usb-storage", but I don't move them
- restart and boot via LiveUSB to the bootloader
- in the welcome screen select the 2nd entry " Custom x64..." and press "e" to enter the GNU GRUB screen
- under the existing lines, add the 2 lines:

Code: Select all

bdev=sda3
bdir=MXLinux\antiX-Frugal-4.19.0-12-amd64
- finally press F10 to save and boot

Like alway it boots to the frugal device selection screen instead of autobooting to the MXLinux Desktop. There is one thing I noticed in the GNU Grub screen: pressing TAB lists the the completions (I assume that's all the available commands/functions). When I type b and press TAB to check for all commands starting with b, there is no bdev or bdir, but background _color and such.
I made another quick test, this time just leaving the Frugal folder in the default location D:\antiX-Frugal-4.19.0-12-amd64
Now the only line I add to the GNU Grub screen is:

Code: Select all

bdev=sda3
I assume bdir is not required, as the default //antiX/ is supposed to point to the anti-X-Frugal folder in sda3? After pressing F10, it again boots to the frugal device selection screen. It seems like the cheat codes are not saved or applied.
Lenovo IdeaPad N581; Intel i5-3230M; 500GB HDD; Intel HD Graphics 4000; 1x 4GB DD3L RAM

User avatar
baldyeti
Posts: 734
Joined: Sat Dec 05, 2009 3:37 pm

Re: Persistent Frugal Install on existing internal HDD

#6 Post by baldyeti »

Hello Pino, these bdir/blab boot parameters are to be added to the kernel line in the grub.cfg file (or interactively at the grub command line), not as extra lines

Here is an example from mine

Code: Select all

menuentry "MX 19-RC1 (patito feo) Frugal Install" {
    search --no-floppy --set=root --fs-uuid 24686e8f-52b3-48df-8825-29e06fe895bb
    linux /MX19RC1/frugal/vmlinuz bdir=MX19RC1/frugal blab=jessie persist_all splasht=v kbd=be
    initrd /MX19RC1/frugal/initrd.gz
}
But i am booting several distributions from hard disk, i am not sure where the grub.cfg file is if you are booting from a USB key.
Ideally if you can find your grub.cfg on the USB key we should be able to modify it for your situation

Normally if you have not moved your installation between partitions, you shouldn't need to use blab and the uuid mentioned in the search line should also appear as parameter to "buuid" on the vmlinuz line. if you have just moved the whole content of the antix-Frugal folder, adjusting "bdir" as above should work.

--edit--
So we have the uuids and labels of all your partitions, please post the result of the following command:

Code: Select all

sudo lsblk --fs

User avatar
Pino
Posts: 17
Joined: Fri Mar 19, 2021 9:55 am

Re: Persistent Frugal Install on existing internal HDD

#7 Post by Pino »

I found the grub.cfg file inside /media/demo/MX-LIVE/boot/grub/. I now added bdev=sda3 to the custom entry (for now just for frugal folder located in D:\):

Code: Select all

menuentry "Custom x64 (19 March 2021)" {
linux /antiX/vmlinuz bdev=sda3 quiet splasht nosplash tz=Europe/Berlin from=usb f_static_root
initrd /antiX/initrd.gz
}
I noticed that my custom menu entry has no search line at all as in your case. After rebooting, it stops at the following error screen:
Fatal Error
The from=usb parameter is blocking device /dev/sda3
Remove the usb boot parameter to allow that device to be scanned

Here is the result of the lsblk command:

Code: Select all

NAME   FSTYPE   LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs                                                              0   100% /live/linux
loop1  ext4                       360dd018-d071-495b-b1bb-290617f28e77  410.6M     8% /live/persist-
sda                                                                                   
├─sda1 ntfs     System-reserviert 7E70C9DE70C99D71                       72.8M    27% /media/demo/Sy
├─sda2 ntfs                       A8CEE6843BC7FE81                       60.6G    68% /media/demo/A8
├─sda3 ntfs                       01D1ACF354194E30                       28.3G    90% /live/boot-dev
└─sda4 ntfs     LENOVO_PART       C2A42A41A42A37F5                                    
sdb                                                                                   
└─sdb1 vfat     MX-LIVE           6402-CA92                              13.7G    10% /media/demo/MX
sr0          


I also booted to the standard MX-19.3 x64 (November 11, 2020) entry to see how it looks there in comparison:

Code: Select all

NAME   FSTYPE   LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs                                                              0   100% /live/linux
sda                                                                                   
├─sda1 ntfs     System-reserviert 7E70C9DE70C99D71                       72.8M    27% /media/demo/System-reserviert
├─sda2 ntfs                       A8CEE6843BC7FE81                       60.6G    68% /media/demo/A8CEE6843BC7FE81
├─sda3 ntfs                       01D1ACF354194E30                       28.3G    90% /media/demo/01D1ACF354194E30
└─sda4 ntfs     LENOVO_PART       C2A42A41A42A37F5                                    
sdb                                                                                   
└─sdb1 vfat     MX-LIVE           6402-CA92                              13.7G    10% /live/boot-dev
sr0    
In both cases the sda3 UUIDs are the same, the difference is the different paths:
/live/boot-dev vs /media/demo/*

By the way I changed the timout value in grub.cfg at the top from 60 to 30 to see if it works. But when booting, the timer in the boot menu starts counting down from the standard 60 seconds instead.
_____
edit:
could it be that I have to use the parameter from=hd instead of from=usb?

edit2:
I now changed from=usb to from=hd via the GNU Grub screen and it resulted in the following error:
Could not find file antiX/linuxfs
Searched devices: /dev/sda4 /dev/sda3 /dev/sda2 /dev/sda1 /dev/sda
Searched types: hd
All block devices: /dev/sdb1 /dev/sdb /dev/sr0 /dev/sda4 /dev/sda3 /dev/sda2 /dev/sda1 /dev/sda
Last edited by Pino on Sat Mar 20, 2021 7:00 am, edited 1 time in total.
Lenovo IdeaPad N581; Intel i5-3230M; 500GB HDD; Intel HD Graphics 4000; 1x 4GB DD3L RAM

User avatar
baldyeti
Posts: 734
Joined: Sat Dec 05, 2009 3:37 pm

Re: Persistent Frugal Install on existing internal HDD

#8 Post by baldyeti »

Since your sda3 has no label, we'll use its (windows) UUID.

i suggest you save your grub.cfg file (or add the following entry to the existing one):

Code: Select all

menuentry "MX Frugal Install" {
    search --no-floppy --set=root --fs-uuid 01D1ACF354194E30
    linux /topfolder/subfolder/vmlinuz bdir=topfolder/subfolder buuid=01D1ACF354194E30 nosplash tz=Europe/Berlin f_static_root
    initrd /topfolder/subfolder/initrd.gz
}
assuming you've moved your installation from the original /antix* folder to /topfolder/subfolder

Note this is just a guess - as i have said i am *not* booting from usb and i use persist_all myself
Sorry if i overcomplicate things, it might be you only need to replace "from=usb" with "from=hd"

User avatar
Pino
Posts: 17
Joined: Fri Mar 19, 2021 9:55 am

Re: Persistent Frugal Install on existing internal HDD

#9 Post by Pino »

I now tested booting with the following menu entry, with the frugal install being located in D:\MXLinux\antiX-Frugal-1

Code: Select all

menuentry "Custom x64 (19 March 2021)" {
search --no-floppy --set=root --fs-uuid 01D1ACF354194E30
linux /MXLinux/antiX-Frugal-1/vmlinuz bdir=/MXLinux/antiX-Frugal-1 buuid=01D1ACF354194E30  quiet splasht nosplash tz=Europe/Berlin f_static_root
initrd /MXLinux/antiX-Frugal-1/initrd.gz
}
Again it boots to the frugal device selection screen. It seems like the booter found all the files correctly (vmlinuz, initrd.gz) but still searches for a seperate frugal folder.

I think specifying the boot location with the boot commands (bdir, buuid etc.) is the wrong approach for the frugal usage. The boot files are stored in the LiveUSB stick from which I will launch LinuxMX. Instead I think I need to specify the frugal location with the help of the frugal commands (fdev, fuuid etc.) that are described on this wiki page:
https://mxlinux.org/wiki/system/frugal-installation/

So for a frugal install located in D:\MXLinux\antiX-Frugal-1 I guess this could work?:

Code: Select all

menuentry "Custom x64 (19 March 2021)" {
linux /antiX/vmlinuz fuuid=01D1ACF354194E30 fdir=MXLinux quiet splasht nosplash tz=Europe/Berlin from=usb f_static_root
initrd /antiX/initrd.gz
}
For fdir I just use fdir=MXLinux is that right? Since the booter will automatically search for for the antiX-Frugal label there by default. Or do I need to use fdir=MXLinux/antiX-Frugal-1

Does the fdir command exist? The fdir command is not listed in the wiki page or the BitJam Github entry, but the developer fehlix mentioned it here: viewtopic.php?p=611711#p611711
Lenovo IdeaPad N581; Intel i5-3230M; 500GB HDD; Intel HD Graphics 4000; 1x 4GB DD3L RAM

evandilanas
Posts: 1
Joined: Sat Mar 20, 2021 9:48 am

Re: Persistent Frugal Install on existing internal HDD

#10 Post by evandilanas »

Hello I have a Laptop that runs on MX linux and i would like to completly remove the OS from it and leave it blank NOTE this laptop does not have Windows never been dual booted. When insert windows live cd does not run even when i change the boot ordet is there a way to remove the OS completly ?

Post Reply

Return to “Installation”