Gentoo, Current state, Test Phase
#1
Hi,
I changed the title to avoid confusion since i decided to fork ayufan's buildscript. Currently it is very promising but I need to fix a few issues before I  make it forum post about it.
Here is a link to my todo list for the script https://gitlab.com/khaosgrille/linux-bui...aster/ToDo and ofc the script itself https://gitlab.com/khaosgrille/linux-build
The goal of the script is to crosscompile an Image with I3Wm and some basic packages.
It will use one script where you can look over all stuff i preinstall so you can change it and get your own Image. Currently there is not much missing for an headless system (see my ToDo file).


I deleted the text of my old post here and changed the title since the method I used first did boot but didn't gave me a nice way  for modding and testing. I will do a fresh new release thread when all is in a more presentable state.
Sorry for the inconvience and the silence for a month. presentable



Khaosgrille

Edit/Latest Post:




Quote:Hi,

quick update from me. I had few problems with scripting the last steps. I have given up (quite early honestly) and  done them by hand  and here is an image (https://grmr.de/khaosgrille/gentoo3.img.tar.xz)

I  only made a minimal image without X or any tweaks. If u use a sd card as a medium I strongly recommend using TMPDIR on tmpfs.
SD Cards have not enough space/inodes and compiling several packages in a row is nearly impossible.
(https://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs)

If everything works fine I will make a bigger announcement in the forum. I would like feedback and hear about things you would like to add.

The /boot dir is currently not quite working in the script (but in the image). Sadly I will be to busy to finish the script.   I just copied the /boot and the /boot/efi/ from ayufans ubuntu^^.

Greetings
Khaosgrille

PS: The image is for 16gb SD cards and is with DHCPCD aswell as the arm/17.0/Desktop profile.
EDIT: username is root and pw is "rock64"
  Reply
#2
Thanks. I will try this myself when I get a chance. I used to use Gentoo a lot.
  Reply
#3
(09-26-2018, 05:11 AM)khaosgrille Wrote: Somehow I cant compress my dd image very well. Using something like
Code:
tar c ./some/path/to/archive | xz -9 --stdout > /tmp/backup.txz
still gives me around 4gb :/. Otherwise i would put a download link here.


You may need to write 0's to the blank space which then makes it a lot easier to compress
  Reply
#4
I gave it a try, but I does not respond to ping when I boot.

The Ubuntu image responds to ping and let me log in on ssh. But the gentoo image does not even respond to ping.

Is it set up to run DHCP?

Thanks!
  Reply
#5
(10-06-2018, 07:23 AM)zener Wrote: I gave it a try, but I does not respond to ping when I boot.

The Ubuntu image responds to ping and let me log in on ssh. But the gentoo image does not even respond to ping.

Is it set up to run DHCP?

Thanks!


Nope I didnt do it/ tried it yet. I will make a new image with DHCP setup. Since I am busy right now it may take 2 weeks or so.
  Reply
#6
The md5sum of sdimage2.img after decompression is 0ffcd44c3b3712ac6e3ac9e743e8decf.

It seem to be stuck in cyclic boot.
  Reply
#7
(10-06-2018, 07:37 AM)khaosgrille Wrote:
(10-06-2018, 07:23 AM)zener Wrote: I gave it a try, but I does not respond to ping when I boot.

The Ubuntu image responds to ping and let me log in on ssh. But the gentoo image does not even respond to ping.

Is it set up to run DHCP?

Thanks!


Nope I didnt do it/ tried it yet. I will make a new image with DHCP setup. Since I am busy right now it may take 2 weeks or so.
If you use a microSD card of smaller size the kernel will complaint that part of the filesystem is outside the device. You will have to make a custom disk image, copy the first 6 partitions, create the 7th, format it as your favourite filesystem, mount it, and copy the files.

-Unpack the file, let's to use sparse files to avoid wasting disk space with zeroes
$ xz -dc gentoo2.xz | dd of=gentoo2 conv=sparse

-Check the partition table with "parted"
$ parted gentoo2
...
(parted) unit b
(parted) print                                                            
Model:  (file)
Disk /home/jose/rockpro64/stretch-minimal-rockpro64-0.7.9-1067-arm64.img: 2144337920B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start       End          Size         File system  Name       Flags
 1      32768B      4128767B     4096000B                  loader1
 2      4128768B    4194303B     65536B                    reserved1
 3      4194304B    8388607B     4194304B                  reserved2
 4      8388608B    12582911B    4194304B                  loader2
 5      12582912B   16777215B    4194304B                  atf
 6      16777216B   134217727B   117440512B   fat16        boot       msftdata
 7      134217728B  2143289343B  2009071616B  ext4         root       legacy_boot

(parted) quit

-Create an empty disk image for your SD card, for example 16000000000 bytes
$ truncate -s 16000000000 sd.raw

-Copy the partition table and the first 6 partitions
$ dd if=gentoo2 of=sd.raw bs=134217728 count=1

-Make the filesystem for the seventh partition
$ mke2fs -t ext4 -E offset=134217728 sd.raw $[16000000000-134217728]

-Become root

-Mount the 7th partition of both images
# mkdir tmp tmp2
# mount -o loop,offset=134217728 gentoo2 tmp

# mount -o loop,offset=134217728 sd.raw tmp2

-Copy the files
# cp -a tmp/* tmp2

-Unmount
# umount tmp
# umount tmp2
# rmdir tmp tmp2

-Done
  Reply
#8
Thanks, but the img file is only 6.3GB whereas my sdcard is 16GB.

Also the file in the URL above is a compressed tar file. I just re-downloaded:


Code:
curl -O https://grmr.de/khaosgrille/gentoo2.xz

md5sum gentoo2.xz
3bc86731ac4a5848bee85a1a275f0979  gentoo2.xz

xz -dc gentoo2.xz | file -
/dev/stdin: POSIX tar archive (GNU)

xz -dc gentoo2.xz | tar xf -

md5sum sdimage2.img
0ffcd44c3b3712ac6e3ac9e743e8decf  sdimage2.img


Same as in my previous post.


Code:
file sdimage2.img
sdimage2.img: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 31116287 sectors, extended partition table (last)

parted sdimage2.img print
Error: end of file while reading /tmp/sdimage2.img
Retry/Ignore/Cancel? I                                                    
Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
OK/Cancel?                                                                
OK/Cancel? OK                                                            
Model:  (file)
Disk /tmp/sdimage2.img: 6716MB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
  Reply
#9
As of friday 26.10.2018 the image has no partition table.


Code:
(parted) print                                                            
Fehler: /home/[your name here]/gentoo2/gentoo2: unbekannte Partitionstabelle
Modell:  (file)                                                          
Festplatte  /home/[your name here]/gentoo2/gentoo2:  6716MB
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: unknown
Disk-Flags:
(parted)                                                                  
  Reply
#10
(10-26-2018, 05:50 AM)tux_on_tour Wrote: As of friday 26.10.2018 the image has no partition table.
                                                              

Hi,

sorry for no response for such a long time. I forked ayufans building script and will release the first version soon.

It is working right now but i need to clean it up a little bit.
I changed the first post with a bunch of new updates.


Khaosgrille
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  ARM CPU Stress Test jzhang18 14 744 08-31-2018, 12:54 PM
Last Post: jzhang18

Forum Jump:


Users browsing this thread: 1 Guest(s)