enigma9o7
Crew Member
 
Posts: 1,116
Likes: 1,151
|
Post by enigma9o7 on Mar 9, 2023 6:22:27 GMT
I decided to prepare my Athlon to test Bodhi 7. A couple years ago it was running Bodhi 5 on a 500GB hard drive. When Bodhi 6 came around, I put in a SSD for the new install, then copied what I needed from the old HDD. After that, the old drive pretty much sat there doing nothing for more than a year. So a couple days ago I thought I'd clone my Bodhi 6 over to the old HDD, so that I could install Bodhi 7 on the SSD and still be able to boot the old Bodhi 6 if anything went wrong and to copy things from, similar to the last version. I copied a few last things, booted into bodhi 5.1 one last time, and made sure there was nothing left I cared about on that drive.
I don't recall ever cloning a Linux drive before, so after a quick web search, decided to use the Clonezilla ISO. Downloaded it and put it on my Ventoy USB drive, booted it up, went thru the menu doing my best guess at settings Started the clone, and less than 2 minutes in, 10.23% done, it froze. Fluke I guessed/hoped, and tried again, however it wouldn't "see" the partition on the old drive anymore. So I tried to boot normal, and my heart sunk went it stopped at and error, dropping me to some busybox initramfs. I had been careful to only write to the old drive so the SSD with Bodhi 6 should have been untouched and boot fine. It told me an error about fsck needing to be performed manually, and then I realized, it was talking about the old drive! Not sure why it couldn't boot the SDD! I booted Bodhi live from USB, and used gparted to remove and recreate a big blank ext4 partition on the old drive. Then I rebooted, with fingers crossed, hoping my original Bodhi 6 was safe.
And it was, it booted fine. Relieved, I tried Clonezilla again, and again, and again with various settings, finally the failsafe mode, but it *always* froze less than two minutes into the clone. So then I tried doing it directly from Bodhi live, installing Clonezilla on there. Same thing. Then tried doing it directly with dd, which also froze up after a couple minutes. Argh. All of this was over a couple days off and on, and seemed to be getting nowhere and didn't have any other ideas, but decided to give up and at least try installing Bodhi 7 on the old HDD. One reason I was doing this was I wanted to make sure the legacy nvidia-340 driver from PPA worked correctly, but never got that far - I froze up during the installation process at some point too, partway through copying files.
So again try to boot back to Bodhi 6 on the SSD, but cannot. The computer itself stops at the end of POST. It won't go into setup with del, won't go into boot menu with esc, none of the normal stuff works - it just finishes detecting ram and drives then stops... forever. Installing Bodhi 7 broke the whole computer! (joking) At this point I think I'm stuck, but decide to unplug the old HDD. Fortunately again, everything is fine, SSD boots Bodhi 6. I shutdown, plug the drive back in, PC stuck at POST again. Unplug it, boot up bodhi 6, plug it in hot, gparted sees it so I delete everything and make a nice ext4 partition again, like I'd done a million times after every Clonezilla freeze. Reboot and still stuck at BIOS. Hmmmmmmm.
So as it is now, if I try to boot (off another drive) with this hard drive plugged in, it can't past POST. So I guess the hard drive is dead? I can still hotplug it after booting. Any tests to run on it before it goes in the bin? Just weird it suddenly decided to die now.... and one step farther away from testing bodhi7 on hardware 
|
|
R0bur
Crew Member
 
Posts: 116
Likes: 83
|
Post by R0bur on Mar 9, 2023 12:33:23 GMT
If the hard drive is recognized (it appears in the "lsblk" list as "/dev/sdX" device), then try to wipe it full with the command "dd if=/dev/zero of=/dev/sdX bs=1024K". Then don't use CloneZilla but install the operating system you like. And note that the Bodhi 7.0 requires more RAM than the Bodhi 6.0 (1024 Mb is the absolute minimum.)
|
|
|
Post by thewaiter on Mar 9, 2023 13:02:54 GMT
Hmm, I have installed BL 7 alpha4 in VM and it takes 250 MB after boot in idle.
|
|
enigma9o7
Crew Member
 
Posts: 1,116
Likes: 1,151
|
Post by enigma9o7 on Mar 9, 2023 17:10:58 GMT
I haven't tested installing with 512mb yet, but I have noticed memory usage is higher. I already mentioned nm-applet using 80-90MB which is more than the 40-50 it uses on Bodhi 6. Next is gnome's policykit, it seems excessive. Perhaps we should switch to lxpolkit? Or does it not provide all the same functionality? I did a comparison: Boot with lxpolkit:
Boot with gnomes:
lxpolkit saves us memory....
|
|
enigma9o7
Crew Member
 
Posts: 1,116
Likes: 1,151
|
Post by enigma9o7 on Mar 11, 2023 1:26:31 GMT
If the hard drive is recognized (it appears in the "lsblk" list as "/dev/sdX" device), then try to wipe it full with the command "dd if=/dev/zero of=/dev/sdX bs=1024K". Then don't use CloneZilla but install the operating system you like. And note that the Bodhi 7.0 requires more RAM than the Bodhi 6.0 (1024 Mb is the absolute minimum.) Thanks much for reply and ideas! So the hard drive is recognized if I hot plug it - meaning plug it in after I boot. This is an internal sata drive so this is not typical operation method  I am running your dd command now, it's been going quite a while (over 30 mins), and no lockup, so I think it's doing good things! When it finishes I'll reboot and see if I can get past BIOS with it still plugged in. But if I can... dunno if I trust this drive. I still want to test it in some way.... As to not using clonezilla and installing what I like on it, I dont want to install anything on it. I know my initial message was long and confusing, but the goal is to copy an existing bodhi 6 to it from from another drive (SSD ) and still be bootable, so I can install bodhi 7 on the whole SSD. The SSD is only 128GB which was more than enough for Bodhi 6+apps+data (55GB used). The HDD will be a backup of Bodhi 6 only, no plans for long term use, because after testing bodhi 7, will continue to use and test it until release on the SSD. I'll wipe and reinstall it again to check the next iso on the SSD, but the goal will be for it to remain bodhi 7, the HDD is just backup of bodhi 6 incase something goes wrong (and to copy stuff from), I doubt I'll use more than 128GB with bodhi 7 either. This machine is too old to run giant games nor do I use it for video encoding or storage, so really can't see any reason why the 128GB SSD would fill up. As to ram, this machine has plenty. In fact, I just upgraded it from 1.5GB to 3.5GB last week, after taking home some memory from family who were spring cleaning and getting rid of some old 32-bit machines. I do see Bodhi 7 using a small percentage more than Bodhi 6, but not significant. I reduced my VM to 512MB and its working fine. I'll test install at 512MB later, to see if we need to update minimum requirements, but as stefan said, once booted it's certainly fine, I see 250-300mb usage myself in virtual machine testing. Looking forward to hardware testing soon!
|
|
R0bur
Crew Member
 
Posts: 116
Likes: 83
|
Post by R0bur on Mar 11, 2023 8:26:41 GMT
The barrier for the Bodhi Linux is not the RAM usage in the working mode but the RAM size used at the system boot stage. At the system boot stage the RAM is used for: - Linux kernel process code and data ( ~50 MB) - packed initrd.gz ( ~120 MB) - unpacked initrd.gz ( ~350 MB) - initial root filesystem extracted from the initrd.gz (~350 MB) So the BL7.0 official distribution won't boot on the computers that have less than 50 + 120 + 2 * 350 = 870 MB. The installed system has more compact initrd (/boot/initrd.img ~ 70 Mb) so it needs at least 50 + 70 + 2 * 210 = 540 MB.
|
|
|
Post by ylee on Mar 11, 2023 14:29:01 GMT
... Perhaps we should switch to lxpolkit? Or does it not provide all the same functionality? I did a comparison: ... lxpolkit saves us memory....
As far as I know, the functionality is the same, but aside from some qt dependencies I just don't care for its appearance. It looks a little dated. Memory saving was about 20M on boot on my testing, using htop to measure system memory. The barrier for the Bodhi Linux is not the RAM usage in the working mode but the RAM size used at the system boot stage. At the system boot stage the RAM is used for: - Linux kernel process code and data ( ~50 MB) - packed initrd.gz ( ~120 MB) - unpacked initrd.gz ( ~350 MB) - initial root filesystem extracted from the initrd.gz (~350 MB) So the BL7.0 official distribution won't boot on the computers that have less than 50 + 120 + 2 * 350 = 870 MB. The installed system has more compact initrd (/boot/initrd.img ~ 70 Mb) so it needs at least 50 + 70 + 2 * 210 = 540 MB. Interesting observation. I never paid any attention to the size of initrd.gz on the ISO vs the installed system. On the ISO, initrd.gz has crept up in size from BL6.0 even tho it is created by the exact same command in the script I use to make the ISO. I briefly looked over my script and googled a few things. My conclusion was "the iso uses gzip for compression as that is what the mkinitrd command uses. The installed system, however, uses zstd compression." I could be wrong as my examination was very brief. But the script certainly uses mkinitrd to create initrd.gz. The question would be is there any way to make mkinitrd.gz smaller on the ISO? And is it worthwhile to do so? I would think it would be worthwhile unless it creates problems for the ISO. As to how to do it I don't know at this moment.
|
|
R0bur
Crew Member
 
Posts: 116
Likes: 83
|
Post by R0bur on Mar 11, 2023 15:23:21 GMT
... The question would be is there any way to make mkinitrd.gz smaller on the ISO? And is it worthwhile to do so? I would think it would be worthwhile unless it creates problems for the ISO. As to how to do it I don't know at this moment. Linux kernel modules and firmware to support computers hardware bring the main weight of the init.gz: /usr/lib/firmware - 36% /usr/lib/modules - 50% They come mainly from the packages "linux-firmware", "linux-modules" and "linux-modules-extra". I think that most significant parts for the booting stage are: - storages and filesystems drivers (to support source and target devices); - videodrivers (to support splash screen). Sound- and network drivers can be loaded later from the filesystem.squashfs content. But I don't know a way to separate those drivers.
|
|
enigma9o7
Crew Member
 
Posts: 1,116
Likes: 1,151
|
Post by enigma9o7 on Mar 12, 2023 3:15:29 GMT
The dd wipe that robur reccommended worked, then I could pass POST and boot again. I tried to clone again, this time with dd. It locked things up, as always. And like before when I tried to clone, it passed POST but prevented boot until I unplugged the drive. Weird stuff.  Attachments:
|
|
R0bur
Crew Member
 
Posts: 116
Likes: 83
|
Post by R0bur on Mar 12, 2023 6:48:22 GMT
I read the posts above and have some questions: 1) What interfaces have the storages (IDE, SATA, SCSI)? 2) Is the HDD configured correct (master/slave) using its jumper?
|
|
enigma9o7
Crew Member
 
Posts: 1,116
Likes: 1,151
|
Post by enigma9o7 on Mar 13, 2023 2:58:07 GMT
Both SATA, no need to set jumpers.
|
|
R0bur
Crew Member
 
Posts: 116
Likes: 83
|
Post by R0bur on Mar 20, 2023 16:54:47 GMT
The question would be is there any way to make mkinitrd.gz smaller on the ISO? And is it worthwhile to do so? I would think it would be worthwhile unless it creates problems for the ISO. As to how to do it I don't know at this moment. I would like to report what I did to reduce Bodhi Linux minimal memory requirements. First, I removed (manually) from the casper/initrd.gz next directories: usr/lib/firmware/ nvidia 2,188 mellanox 3,672 liquidio 4,920 i915 5,016 radeon 6,052 netronome 35,008 amdgpu 59,308
usr/lib/modules/5.15.0-67-generic/kernel/drivers/ scsi 19,772 net 39,928 gpu 50,440
(The numbers are size of the directories in KB)
After this, the unpacked size of the initial filesystem is 129 MB (instead 350 MB), and the packed size is 48 MB (instead 116 MB). Second, I put new packed initrd in the file /casper/initrd.zstd and added menu items in the file /casper/isolinux/isolinux.cfg to use it instead initrd.gz: label lowram-live menu label Try Bodhi (Low RAM) kernel /casper/vmlinuz append file=/cdrom/preseed/custom.seed boot=casper initrd=/casper/initrd.zstd quiet splash -- label lowram-live-install menu label Install Now (Low RAM) kernel /casper/vmlinuz append file=/cdrom/preseed/custom.seed boot=casper only-ubiquity initrd=/casper/initrd.zstd quiet splash --- These steps let me to boot Bodhi Linux 7.0 live and install it on the VM with 768 MB RAM instead 1024 MB for the original Alpha-4. I tested this modified image on two hardware system in live mode with a success. The one thing that I lost is the graphical splash animation.
|
|
enigma9o7
Crew Member
 
Posts: 1,116
Likes: 1,151
|
Post by enigma9o7 on Mar 20, 2023 20:14:18 GMT
Does that mean you had to completely remove firmware and drivers? If so, that may be a solution for some, but obviously some people have that hardware and would need that stuff.... Or maybe I just don't understand what you're doing anyway, maybe you're just not unpacking that stuff to ram and leaving it on the dvd/usbdrive unless the user needs them, which obviously is better... In any case, I did try booting the new (alpha5) iso with 512MB and 768MB in VM to see what happens, and can confirm it cannot boot cuz initramfs unpacking failed. So BL7-64bit minimum is 1GB... which I doubt eliminates many users cuz not many/any 64-bit machines came with less than 1GB anyway. (Some 32-bit machines certainly did tho....)
Attachments:
|
|
R0bur
Crew Member
 
Posts: 116
Likes: 83
|
Post by R0bur on Mar 21, 2023 6:35:25 GMT
Does that mean you had to completely remove firmware and drivers? Yes and no. The Bodhi Linux distribution image contains device drivers in three different places: - in the Linux kernel (statically linked kernel modules); - in the file casper/initrd.gz (packed starting root filesystem); - in the file casper/filesystem.squashfs (packed main root filesystem). The main purpose of the packed starting root filesystem from casper/initrd.gz is to let the kernel to find and access the distribution image content. Because the content of initrd.gz is unpacked into RAM, it must contain only absolutely necessary device drivers to solve its problem. Linux kernel switches to the main root filesystem casper/filesystem.squashfs as soon as the starting root filesystem will solve the problem it designed for. The main root filesystem contains full set of device drivers that are used in live mode and by ubiquity installer. These drivers are copied to the target device during installation. So I really removed some noncritical drivers from the file casper/initrd.gz. The rest of drivers and built in kernel SCSI support are enough to find the distribution image content and to switch the root filesystem to the filesystem.squashfs. And last what I would to say. The described method doesn't break any official image functionality because standard casper/initrd.gz and menu items all are left in place. This method only extends this functionality letting to boot up Bodhi Linux for low-ram PCs and notebooks users. The price we pay for it - the size of the additional file casper/initrd.zstd - 50 MB on the distribution image.
|
|
R0bur
Crew Member
 
Posts: 116
Likes: 83
|
Post by R0bur on Mar 21, 2023 13:38:15 GMT
I wrote two shell scripts to simplify the procedure of compacting initrd and rebuilding the distribution image. So everyone can try it. All you need is a Bodhi Linux machine with 1024 MB RAM and 3 GB free space on its disk. A virtual machine with a fresh installation of Bodhi Linux 6.0 or 7.0 is great. The only additional package you need is 'genisoimage'. What to do (as a generic user, not root): 1) Extract the archive 'bl70a_lowram.tgz' (attached to this message) and change current directory: $ tar -zxf bl70a_lowram.tgz $ cd bl70a_lowram 2) Create a directory and fill it with the official ISO image contents: $ mkdir isofs $ cp -R /mnt/BL70A/. ./isofs/ where '/mnt/BL70A' is the mount point of 'bodhi-7.0.0-64-alpha.iso'. Be sure that the hidden directory '.disk' was copied successfully: $ ls -l ./isofs/.disk 3) Create the compact 'initrd.zstd' using the shell script 'shrink_initrd.sh': $ /bin/sh shrink_initrd.sh It will produce the file './isofs/casper/initrd.zstd' 4) Place new bootloader menu into the ISO image filesystem: $ cp isolinux.cfg ./isofs/isolinux/ 5) Create new ISO image using the shell script 'make_iso.sh': $ /bin/sh make_iso.sh It will produce the file './bl70a-lowram.iso' 6) Burn a bootable media based on 'bl70a-lowram.iso' and test menu items "Try Bodhi (Low RAM)" and "Install New (Low RAM)" Attachments:bl70a_lowram.tgz (1.96 KB)
|
|