The officially official Devuan Forum!

You are not logged in.

#1 2021-01-30 03:59:10

mcc
Member
Registered: 2021-01-27
Posts: 8  

Repartioning the SSD after flashing a Devuan Beowulf image

Hi,

(this is all to be used with a Raspberry Pi 4)

With

xzcat "image".xz > /dev/sdb

I flashed an image of Devuan Beowulf 3.0 onto my SSD. The image was provided by c0rnelius under this link:
https://github.com/pyavitz/rpi-img-buil … tag/images    (THANKS A LOT! smile ).

The image booted fine and sshd via ethernet worked out of the box.

After shutdown the Raspi, attaching the SSD to my Linux PC and looking at the partitioning I found two partitions:
A very small boot partition and a very large root partion (more than 100GBytes).

For backup reasons I would like to have at least an additon partition for my $HOME.

Since this has worked for a lot of cases, I shrinked the root partition with gparted, added an addtional partition with an ext4 file system, wrote whole stuff to the SSD (no error/warning) and fired up my Raspi with the SSD.

It does not boot anymore.

I reflashed the image, and did the partioning before the first boot. Same thing: No boot.
I reflashed the image, and did the partioning, disable the automatic partition resizer, boot the Raspi. Again: No boot.
In all cases the partition for $HOME was left off fstab (to be added, if boot succeeds, which it doesn't).

I searched the forum with "repartitioning" and "gparted" and found either nothing or much too much hits to be of what I wanted.

Did I overlooked something? How can I successfully modify the partion scheme?

Cheers!
mcc

Offline

#2 2021-01-30 11:44:41

c0rnelius
Member
Registered: 2020-06-13
Posts: 51  

Re: Repartioning the SSD after flashing a Devuan Beowulf image

My guess would be that after using gparted the PARTUUID has changed. Attach the SSD and run sudo blkid and see if it matches whats in /boot/cmdline.txt

Offline

#3 2021-01-30 12:30:32

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 1,106  

Re: Repartioning the SSD after flashing a Devuan Beowulf image

Note that you can set the uuid of an ext4 parition with tune2fs, i.e. you should be able to restore the uuid of the shrunk partition.

Offline

#4 2021-01-30 13:38:34

c0rnelius
Member
Registered: 2020-06-13
Posts: 51  

Re: Repartioning the SSD after flashing a Devuan Beowulf image

ralph.ronnquist wrote:

Note that you can set the uuid of an ext4 parition with tune2fs, i.e. you should be able to restore the uuid of the shrunk partition.

Might be easier just to add the new root=PARTUUID=newid-02 to /boot/cmdline.txt and be done with it. Or you could just hard code it in with something such as root=/dev/sda2.

Offline

#5 2021-01-31 00:43:03

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 1,106  

Re: Repartioning the SSD after flashing a Devuan Beowulf image

Sure.  you might then also need to edit /etc/fstab and if there's anything else have captured the old uuid.

Just in parenthesis: hardcoding the uuid is no less hardcoding than hardcoding the partition device name. At some stage in history there was that idea of partition "label" which survives partition resize, move and copy; that could be used as well.

Offline

#6 2021-02-28 17:37:32

kuleszdl
Member
Registered: 2018-11-03
Posts: 107  

Re: Repartioning the SSD after flashing a Devuan Beowulf image

I also highly recommend using partition labels over UUIDs. You can find a detailed example how they can be used in my generic aarch64 tutorial here:

https://www.kulesz.me/post/140-debian-d … 4-install/

Offline

#7 2021-03-01 22:33:18

berni51
Member
From: Middle of Germany
Registered: 2018-12-20
Posts: 94  
Website

Re: Repartioning the SSD after flashing a Devuan Beowulf image

Hey, great thread!! Thanks to @mcc for sharing the link with Devuan images for the Raspberry 4. c0rnelius made a fine job and the system runs properly and rock solid.
OK, it was a little bit tricky to set up a German keymap, but now it works as well as X. Now I have an alternative to raspian.
Again, many thanks to @C0rnelius and @mcc.

Regards
Berni


The good ol' days will not return, and the rocks might smelt and the sea may burn.

Offline

Board footer