cloning an easyos installation

Moderator: BarryK

Post Reply
oliverjames
Posts: 56
Joined: Tue Sep 22, 2020 4:21 pm
Has thanked: 12 times
Been thanked: 8 times

cloning an easyos installation

Post by oliverjames »

Hello, I have a nice functional EasyOS installation on a usb key that I would like to clone this to a newly created partition on my laptop (ssd, gpt, EFI vfat boot partition) Please can you advise the best way to do this?

Reading https://easyos.org/install/how-to-insta ... drive.html I clearly have to make changes to the fat32 ESP partition (which currently holds folders for Mint and for MX) but I'm not sure of what to copy here.

Thank you.

williwaw
Posts: 2039
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 183 times
Been thanked: 389 times

Re: cloning an easyos installation

Post by williwaw »

cloning has different meaning to different people. cloning can mean to duplicate a disk image to a different disk, and if this is what you want to do then you may have problems if you boot from your USB on a machine that has the same disk image on an internal drive.

I think tho, that you are asking how you can have a frugal install on an internal drive that contains additional things from what is on your USB.
For a new frugal install......

look at the page you linked above you will see.....

This page focuses on UEFI computers. For a tutorial that focuses on BIOS computers, look here:

https://easyos.org/install/easy-frugal- ... ation.html

as you read at that other page you will see that it is also possible to have a frugal install on a UEFI computer such as you have with mint.etc

Install to ext4 partition
Installation is incredibly simple. You just need to create a folder in the ext4 partition, and copy three files, 'vmlinuz', 'initrd' and 'easy.sfs' into that folder. Those files are inside the 'easy-<version>-amd64.img' file.

Which raises the question, how do you open up that image file and extract those files?
If you go to this page, various ways of opening up the image file are explained:

https://easyos.org/user/how-to-update-e ... l_updating

You can do it while running any Linux distribution; however, with EasyOS it is extremely simple, just click on the image file.

So, you might find it will make life easier to write the image file to a USB-stick and boot that. That is also easy, explained here:

https://easyos.org/install/how-to-insta ... w-ssd.html
You have got access to those three files, either by opening up the image-file or by writing the image-file to a USB-stick. The image-file consists of two partitions, like this:

Gap
1MiB
Boot-partition
7miB fat12
Working-partition
816MiB ext4
Here they are, mounted, firstly the vfat partition:

img10

Secondly, the ext4 partition:

img11

To install EasyOS to the ext4 partition on the computer internal drive, copy those three files 'vmlinuz', 'initrd' and 'easy.sfs' across.

In the ext4 partition of the internal drive, create a folder, say "easyos", or, you could go deeper, say "easyos/dunfell", then copy those files into it.

Hey presto, EasyOS is installed!

Yes, that is all there is to it. EasyOS is installed in what we call "frugal mode", which only occupies one folder in the partition. Thus, the rest of the partition is available for anything else.

There is one remaining vital detail, you need to figure out how to boot Easy. This is the tricky part. A bootloader is required, such as GRUB, GRUB4DOS, or Limine. If one of these is already installed, good, you can just add EasyOS to its menu. Otherwise, you will have to install a bootloader.
Firstly, considering the situation where GRUB or GRUB4DOS is already installed...

Add menu entry to GRUB
Firstly considering GRUB4DOS. Where it is installed, you will find a file 'menu.lst'. Insert something like this:

title EasyOS Dunfell (partition sda3 folder easyos)
find --set-root uuid () 054a04b8-0f00-11ed-aeb9-287fcfeb4376
kernel /easyos/vmlinuz rw wkg_uuid=054a04b8-0f00-11ed-aeb9-287fcfeb4376 wkg_dir=easyos
initrd /easyos/initrd
That UUID value can be found by running the 'blkid' utility, for the example of EasyOS installed in partition /dev/sda3, with partition-label "easy2":

# blkid /dev/sda3
/dev/sdb2: LABEL="easy2" UUID="054a04b8-0f00-11ed-aeb9-287fcfeb4376" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="a3976784-02"
Considering GRUB2, the Author has no experience; however, gleaned from what others have done, the /etc/grub.d/40_custom file will need something like this inserted:

menuentry "EasyOS Dunfell (partition sda3, folder easyos)" {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root 054a04b8-0f00-11ed-aeb9-287fcfeb4376
linux /easyos/vmlinuz rw wkg_uuid=054a04b8-0f00-11ed-aeb9-287fcfeb4376 wkg_dir=easyos
initrd /easyos/initrd
}
Apparently, GRUB2 then needs to be updated, like this:

# update-grub
or, depending on your distribution:
# grub2-mkconfig -o /boot/grub2/grub.cfg
A clarification about those two parameters wkg_uuid and wkg_dir...

Clarification:
wkg_uuid and wkg_dir are not required by GRUB. They are kernel boot parameters and are read by the 'initrd' file, to tell it where EasyOS is installed. That is, they tell the 'initrd' in what partition and what folder 'easy.sfs' is located (and also where 'initrd' and 'vmlinuz' are located). It might seem redundant, since that information is already provided in the GRUB menu entry; however, the 'initrd' has to be told separately.
Something else that is useful to know: instead of wkg_uuid, you could use "wkg_label" or "wkg_dev", which for the above example would be "wkg_label=easy2" or "wkg_dev=sda3". However, you would need to be certain the filesystem label is unique. Also, for wkg_dev, you would need to be certain that the partition device name doesn't change; for removable drives, the device name is likely to change.
There is something to be aware of if using old GRUB bootloaders...

Problem with old GRUB versions:
GRUB v1, GRUB4DOS, and GRUB v2 prior to version 2.0.4 (released 2019), do not recognise an ext4 filesystem if it has modern features such as the "encrypt" feature turned on. You can still use them; however, the feature of EasyOS to encrypt some folders in the working-partition will not be available. Folder encryption is a security protection if someone steals your computer, or whatever media EasyOS is installed on. You will have to forego that extra protection.
What you might want to consider, if you have one of those old GRUB bootloaders installed, to replace with either a modern GRUB v2, or the Limine bootloader.
Limine bootloader is the "official" bootloader for EasyOS, and is available in all releases of Easy from 4.2.2 onward...

if you are keeping mint and or mx there may be an easier way to add your boot stanza to your present bootloader
see this topic: viewtopic.php?t=13653

If your EasyOs on your USB has configurations a stuff added that you wish to move over, you will also need to move your working directory.

oliverjames
Posts: 56
Joined: Tue Sep 22, 2020 4:21 pm
Has thanked: 12 times
Been thanked: 8 times

Re: cloning an easyos installation

Post by oliverjames »

williwaw wrote: Tue Jan 21, 2025 4:49 pm

cloning has different meaning to different people. cloning can mean to duplicate a disk image to a different disk, and if this is what you want to do then you may have problems if you boot from your USB on a machine that has the same disk image on an internal drive.

I think tho, that you are asking how you can have a frugal install on an internal drive that contains additional things from what is on your USB.
For a new frugal install......

if you are keeping mint and or mx there may be an easier way to add your boot stanza to your present bootloader
see this topic: viewtopic.php?t=13653

If your EasyOs on your USB has configurations a stuff added that you wish to move over, you will also need to move your working directory.

Thank you.
I plan to keep mint and mx and will therefore look at the reference you give.

I speak of cloning because I'd like the setup with all added applications and configurations to be copied over from the usb to the new partition, thereby saving a lot of time. When you talk of moving my working directory can you say which one that is please? I guess that I also need to copy over the sfs, appimage and flatpack directories. Can I just dd the entire easyos directory?

n00b
Posts: 16
Joined: Thu Jul 06, 2023 2:43 pm
Been thanked: 2 times

Re: cloning an easyos installation

Post by n00b »

For example gnome-disk-utility (available in the Daedalus repository) can create and restore disk and partition images. Maybe you could try creating a partition image of the ext4 partition on the stick and restoring it to the ssd partition and see if that works?

oliverjames
Posts: 56
Joined: Tue Sep 22, 2020 4:21 pm
Has thanked: 12 times
Been thanked: 8 times

Re: cloning an easyos installation

Post by oliverjames »

n00b wrote: Tue Jan 21, 2025 6:50 pm

For example gnome-disk-utility (available in the Daedalus repository) can create and restore disk and partition images. Maybe you could try creating a partition image of the ext4 partition on the stick and restoring it to the ssd partition and see if that works?

Thank you. That's a good idea, Edit: I gave it a try but gdisk wouldn’t accept to restore the image to a different partition.

However, from the version running from the memory card I simply copied directory easyos and contents to the new partition created on the ssd. I copied the "BOOT" directory from the EFI directory of the vfat partition of the memory card to the EFI directory on the ssd. I then rebooted to Mint, added the suggested Grub2 script to Custom_40 in /etc/grub.d, ran sudo update-grub and all appears to work perfectly, with one exception; I've lost the sound icon (MSCW and mixer) from the panel edit: reboot and file system check may have done it but the sound icon is now back.

Pleasantly surprised, and very impressed by this little puppy!

User avatar
BarryK
Posts: 2871
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 149 times
Been thanked: 788 times

Re: cloning an easyos installation

Post by BarryK »

oliverjames wrote: Tue Jan 21, 2025 7:33 pm
n00b wrote: Tue Jan 21, 2025 6:50 pm

For example gnome-disk-utility (available in the Daedalus repository) can create and restore disk and partition images. Maybe you could try creating a partition image of the ext4 partition on the stick and restoring it to the ssd partition and see if that works?

Thank you. That's a good idea, Edit: I gave it a try but gdisk wouldn’t accept to restore the image to a different partition.

However, from the version running from the memory card I simply copied directory easyos and contents to the new partition created on the ssd. I copied the "BOOT" directory from the EFI directory of the vfat partition of the memory card to the EFI directory on the ssd. I then rebooted to Mint, added the suggested Grub2 script to Custom_40 in /etc/grub.d, ran sudo update-grub and all appears to work perfectly, with one exception; I've lost the sound icon (MSCW and mixer) from the panel edit: reboot and file system check may have done it but the sound icon is now back.

Pleasantly surprised, and very impressed by this little puppy!

Good!

Yes, that is how to do it, just copy all of "easyos" folder, then all that is required is to create an appropriate entry in the boot-manager.

Post Reply

Return to “EasyOS”