EasyOS Dunfell 2.7.2 released

Moderator: BarryK

Post Reply
User avatar
BarryK
Posts: 2695
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 132 times
Been thanked: 738 times

EasyOS Dunfell 2.7.2 released

Post by BarryK »

Ha ha, another one, just 4 days after 2.7.1!

Blog announcement:

https://bkhome.org/news/202104/easyos-d ... eased.html

scsijon
Posts: 202
Joined: Fri Jul 24, 2020 10:11 am
Has thanked: 6 times
Been thanked: 18 times

Re: EasyOS Dunfell 2.7.2 stuffed up!

Post by scsijon »

In a new desktop and motherboard/amdcpu. This machine, like a lot of the latest motherboards have only ssd and usb ports, no sata or maybe one single ended for the dvd drive only(, this one doesn't). There are now usually 16 usb ports on the motherboard for all devices including drives, (the latest dvd drives are usb3,) there are NO sata or other connectior types on the motherboard for drives.

I tried to install 2.7.2 to the bottom of a working hard drive that connects via a usb port (it had a much older version of EasyOS that needed upgrading but wouldn't that i deleted on it). The new install has failed destructively, and it's both deleted the existing swap partition on the drive as well as all the data in the higher partitions that were left on it. I was given to understand from your blog that you had set it so it would stop at the end of the free space of a working drive, not overwrite the partition table, or did i miss-understand it? Since it's 8 terrabyte it will take some time to sort out, and thankfully i do have backups of what has been lost (across multiple drives), but as you can expect, I am at present pieved, and a little unhappy at this point of time.

By the way, the drive that came with it had Opensuse Tumbleweed on it. I did have a go at a quirky opensuse many years ago, but gave up releasing it, with the number of repositories it had to deal with. Mainly how to work with the Petget packagemanager, as from memory there were between 12 and 16 active ones (depending on your desktop), plus separate update ones. Building it went well at the time I remember as it's on my archive tree somewhere. The problem was that package upgrades and adding new packages became a nightmare. I might revisit it after having a proper look at petget to see how to deal with that, ?unless you or someone else is already doing that.

williwaw
Posts: 1957
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 172 times
Been thanked: 371 times

Re: EasyOS Dunfell 2.7.2 stuffed up!

Post by williwaw »

scsijon wrote: Wed Apr 28, 2021 12:28 am

I tried to install 2.7.2 to the bottom of a working hard drive that connects via a usb port (it had a much older version of EasyOS that needed upgrading but wouldn't that i deleted on it). The new install has failed destructively, and it's both deleted the existing swap partition on the drive as well as all the data in the higher partitions that were left on it. I was given to understand from your blog that you had set it so it would stop at the end of the free space of a working drive, not overwrite the partition table, or did i miss-understand it? Since it's 8 terrabyte......

ouch...that's terrible
could you share which instruction in the blog you were following, or more details about your install method?

User avatar
BarryK
Posts: 2695
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 132 times
Been thanked: 738 times

Re: EasyOS Dunfell 2.7.2 stuffed up!

Post by BarryK »

scsijon wrote: Wed Apr 28, 2021 12:28 am

I tried to install 2.7.2 to the bottom of a working hard drive that connects via a usb port

I need to know exactly what you did to install.

Did you create a working partition of 640MB size? If so, why?

If the answer is yes, it was 640MB, and If the drive, as you say, had free space immediately after the 640MB partition, why didn't you just create a working partition of the correct size to fill the available space?

The code in the init script in the initrd is very cautious about whether to expand the size of the working drive:

Code: Select all

 Wsize="$(fdisk -u -l /dev/${WKG_DRV} | grep "^/dev/${WKG_DEV} " | tr -s ' ' | rev | cut -f 3 -d ' ' | rev)"
 #be very paranoid, only resize if working part is this exact size...
 #if [ $Wsize -eq 655360 ];then #current skeleton, it is 655360 (640MB).
 if [ "$Wsize" == "640M" ];then #current skeleton, it is 655360 (640MB).
  #starting sector of wkg partition...
  Wstart="$(fdisk -u -l /dev/${WKG_DRV} | grep "^/dev/${WKG_DEV} " | tr -s ' ' | rev | cut -f 6 -d ' ' | rev)"
  #need to be paranoid here, to get this right, restrict to my two skeletons...
  if [ $Wstart -eq 1310720 -o $Wstart -eq 1343488 ];then #640MB or 656MB.
   #this has to be done with all partitons in WKG_DRV unmounted...
   echo -n -e "\\033[1;35mResizing working-partition to fill drive\\033[0;39m\n " #purple
   echo -e "d\n${WKG_PARTNUM}\nn\np\n${WKG_PARTNUM}\n${Wstart}\n\nw" | fdisk -u /dev/${WKG_DRV} > /dev/null 2>&1
   #fdisk should have informed kernel to rescan partition table, however precaution...
   partprobe /dev/${WKG_DRV}
   Wnewsize="$(fdisk -u -l /dev/${WKG_DRV} | grep "^/dev/${WKG_DEV} " | tr -s ' ' | rev | cut -f 3 -d ' ' | rev)"
   ###mount boot partition###
   mount_boot
   Bmntd=1
   ###temporary mount easy.sfs###
   mount_tnew
   if [ "$Wnewsize" == "640M" ];then
    echo -e "\\033[1;31m  WARNING: unable to resize working-partition\\033[0;39m" #red
   else
    Wbad=0
    echo "  Resizing ext4 filesystem to fill ${Wnewsize} working-partition"
    #190311 want dots, as this may take awhile... 190314
    #chroot tnew /bin/busybox ash -c "/sbin/resize2fs -f /dev/${WKG_DEV} > /resize2fs.log 2>&1"
    echo "#!/bin/ash
 /sbin/resize2fs -f /dev/${WKG_DEV} > /resize2fs.log 2>&1" > tnew/resizeX
    chmod 755 tnew/resizeX
    echo "#!/bin/ash
 /resizeX &
 echo -n '  '
 while /bin/busybox pidof resizeX >/dev/null;do
  sleep 1
  echo -n '.'
 done
 echo" > tnew/resize.sh
    chmod 755 tnew/resize.sh
    chroot tnew /bin/busybox ash -c "/resize.sh"
    if grep 'Nothing to do' tnew/resize2fs.log >/dev/null; then Wbad=1; fi
    if grep 'missing' tnew/resize2fs.log >/dev/null; then Wbad=1; fi
    if grep 'Error' tnew/resize2fs.log >/dev/null; then Wbad=1; fi
    [ ! -s tnew/resize2fs.log ] && Wbad=1
    [ $Wbad -eq 1 ] && echo -e "\\033[1;31m  WARNING: unable to resize ext4 filesystem to fill ${Wnewsize} working-partition\\033[0;39m" #red
   fi
  fi
 fi

It looks for a very particular situation, that would, or rather should, only exist on the flash stick image. The 640MB working drive has to start at an offset of 1310720 or 1343488 sectors, which is 640MB or 656MB from the physical start of the drive. The flash stick image has a 1MB gap at start of drive, then a 639MB fat32 partition, then a 640MB working partition.

I never dreamed that anyone would replicate that on a hard drive with existing partitions.

scsijon
Posts: 202
Joined: Fri Jul 24, 2020 10:11 am
Has thanked: 6 times
Been thanked: 18 times

Re: EasyOS Dunfell 2.7.2 released

Post by scsijon »

sorry, been busy on other things, while the drive was sorted out.

I have a system that is permanently setup as a master backup /archive system and was origonally a pentium-D scsi tower of 14 scsi drives of various sizes setup to represent to the user as a single storage partition and ran puppy 3.0.2. It had got to the stage of badly needing the scsi storage to be replaced and I obtained a new 4tb sata drive and interface card (the motherboard was pre-sata) to move it all across to, that drive lasted 3 days and they sent the 8tb usb3 (internal) drive and usb3 card as an apology as they had no more of the new 4tb drives. This drive I setup with easyos 1.1.1, 2 partitions as sdx1 and sdx2, sdx3 was a swapdrive of 8gb (as the old pentium-D only had 2gb ram), two paritions were setup as sdx5 (old stuff from the scsi system), sdx6 (going forward) for the backup/archive system. The 'x' as it was origonally setup as sdb while working the old scsi system ran as sda and of course and became sda after i disconnected the scsi drives side of it.

Moving this drive to it's new amd micro box (size of a large dictionary) a couple of months ago, it all ran sucessfully.
Having read from a note of yours, that I could update to a new easyos and it would only fill up the space to the existing working partitions and not kill them, i thought i should have a go as i'd like to move it to one of my core2duo optiplex boxes and use the amd as a development box (, easyos 1.1.1 won't run on the optiplex, we tried, chipset problems).

I deleted sda1 and sda2 partitions, left sda3 to sda6 alone and rebooted with a stick already loaded with d-2.7.2, and having the relevant img.gz available i started the easydd frontend application, it seemed that it installed properly (2 new partitions), leaving the old ones there (I checked).
I rebooted to allow it to do it's thing with expanding sda2, etc.
it started ok, but just overwrote the rest of it to leave me with 2 partitions.
Even overwrote a swap partition that i thought was turned on and therefore shouldn't be.

I've now (overnight) shrunk sda2 to it's propper size, created and turned on a 8gb swap partition (although with 8gb ram in the amd box It will most likely never be need) and created new sda5 and sda6 partitions. All tht's left to do is setting up the old scsi tower and hoping the drives still / can be got to run to recover the contents for sda5 (the contents cover stuff that go back to my cpm/mpm days, I still look after a site running it, so it's needed as i keep their archives) and on sda6 my weekly backup drives for my other individual systems and the systems themselves, (that has lost some data I don't think I won't be able to recover).

let me know it you have other questions.

EDIT: just rereading it all >

Your statement that "The flash stick image has a 1MB gap at start of drive,...",

It's not just the sticks, all usb storage devices that i've used have this space, at least all i've used. And just checking, even my cameras (internal memory only) and my usb connected phones (ditto) show this. From memory, this space had the raw driver in it.

User avatar
BarryK
Posts: 2695
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 132 times
Been thanked: 738 times

Re: EasyOS Dunfell 2.7.2 released

Post by BarryK »

scsijon wrote: Thu Apr 29, 2021 1:28 am

I deleted sda1 and sda2 partitions, left sda3 to sda6 alone and rebooted with a stick already loaded with d-2.7.2, and having the relevant img.gz available i started the easydd frontend application, it seemed that it installed properly (2 new partitions), leaving the old ones there (I checked).

Surely I have misunderstood the above statement, surely you haven't actually done that.

Reading the above, you booted from a usb stick, then used easydd to write the image to the sda drive?

If so, it would have wiped everything on the drive. "leaving the old ones there" -- wrong, they would have been deleted.

The 'dd' utility writes an image to the entire drive, and EasyDD warns just before you commence:

Check very carefully that target drive is correct, as it will be entirely rewritten, and all pre-existing partitions wiped. Only click the OK button if you know what you are doing!

If you used EasyDD to write to the drive, then destruction of the partitions has already happened before EasyOS on sda has been booted. EasyOS will just see empty space beyond the working-partition and will expand the partition to fill it.

User avatar
BarryK
Posts: 2695
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 132 times
Been thanked: 738 times

Re: EasyOS Dunfell 2.7.2 released

Post by BarryK »

As an extra note to the above post.

Your sda drive was probably partitioned with a GPT, GUID Partition Table, and there are two of these tables, one at the beginning of the drive and a backup at the physical end of the drive.

The EasyOS image has a MSDOS partition table, which is near the start of the drive. That image is only 1.2GB, so the rest of the 8TB drive is left as-is.

So after using dd to write the easyos image file to the drive, there will still be the old GPT table at the end of the drive, and this is going to confuse programs like gptdisk (gdisk) and gparted. Gparted will see totally different partition tables and probably report an error and maybe ask for some kind of "recovery". Gparted may then see the old partitions, but they are ghosts, the drive has been stuffed up.

In theory though, those partitions beyond 1.2GB could be recovered, but not easily. But after booting the installation of EasyOS they would be gone.

User avatar
mikeslr
Posts: 2965
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 922 times

Re: EasyOS Dunfell 2.7.2 released

Post by mikeslr »

Hi scsijon,

See williwaw's and Barry K's replies to the question I asked: viewtopic.php?p=22631#p22631; viewtopic.php?p=22727#p22727. Barry's reply quotes the question. From the foregoing, I think the procedure in your case is to:
1. treat EasyOS as you would a Puppy -- that is copy its system files from the USB-Key to (a folder) on the hard-drive.
2. You'll need to "fix" initrd: mount and a GUI to do so appears. See Barry's post cited below.
3. In my case there already was a bootloader (frugalpup-installer). You'll need to install one., AFAIK, grub4dos is OK for non-UEFI computers; and maybe you'll have to write a menu entry,

Well, perhaps it would be best to read Barry's instructions here: https://easyos.org/install/how-to-insta ... drive.html and the links from it.

Post Reply

Return to “EasyOS”