IRC log of #cubox of Wed 29 May 2019. All times are in CEST < Back to index

09:28 Exaga> jnettlet: are you around?
09:29 jnettlet> Exaga: yep
09:29 Exaga> good morning
09:29 jnettlet> how have you been?
09:29 Exaga> i've just installed the Deabian OS image from https://images.solid-build.xyz/A38X/
09:29 Exaga> mate... life is really bad
09:30 jnettlet> almost done with my second cup of coffee, so the morning is looking better
09:30 Exaga> i was made redundant on 10 May
09:30 Exaga> and the company aren't being very supportive or helpful
09:30 jnettlet> sorry to hear that.
09:30 Exaga> but that's my story
09:30 Exaga> it's fine jnettlet... life has its ups and downs
09:30 jnettlet> what are you working with?
09:31 Exaga> hopefully i will find another job but first... time to play with SolidRun devices <3
09:31 jnettlet> you looking for full time, or consulting?
09:31 Exaga> hahaha
09:31 jnettlet> fair enough
09:31 Exaga> I am findamentally a PC mechanic
09:31 Exaga> repairs, maintenance, etc
09:32 Exaga> specialised in hardware and virus/malware removal
09:32 Exaga> that was my job
09:32 Exaga> it's what i've done for 12 years
09:32 Exaga> my hobby is ARM devices
09:33 Exaga> and Slackware ARM
09:33 Exaga> i created and still maintain SARPi (Slackware ARM on a Raspberry Pi) installers on sarpi.fatdog.nl
09:33 jnettlet> you looking for a career change?
09:33 Exaga> I have also done an installer for the Hummingboard - humbo.fatdog.nl
09:34 Exaga> jnettlet: my hobby is way more enjoyable than my previous job :D
09:34 Exaga> i might have to look at changing vocations
09:34 Exaga> not easy in England to get a job right now
09:35 Exaga> anyway how are you?
09:35 jnettlet> of course.
09:35 jnettlet> busy. So many boards
09:35 Exaga> haha ye
09:36 Exaga> never a peaceful moment I guess
09:36 jnettlet> and getting ready to launch our new Workstation board
09:36 Exaga> well i have a really silly and noobish question for you
09:36 Exaga> hopefully not taking up any of your time
09:36 jnettlet> https://www.solid-run.com/nxp-lx2160a-family/clearfog-itx/
09:36 Exaga> i have a clearfog pro
09:36 Exaga> and i have just installed Debian
09:37 jnettlet> I always have time for the community. Keeps me sane
09:37 Exaga> and i am needing to fill up all the free space on the microSD card
09:37 Exaga> on raspbian this is so simple
09:37 Exaga> but i am having problems doing it with debian on the clearfog
09:38 jnettlet> which image are you using?
09:38 Exaga> and, of course, you are the man to ask :>
09:39 Exaga> https://images.solid-build.xyz/A38X/sr-a38x-debian-stretch-20180406.img.xz
09:39 Exaga> that one
09:40 Exaga> i have an 8GB sd card but only 1GB partition
09:40 Exaga> Device Boot Start End Sectors Size Id Type
09:40 Exaga> /dev/mmcblk0p1 8192 2097151 2088960 1020M 83 Linux
09:41 jnettlet> okay, so I can't remember if that image resizes to the entire sdhc on first boot.
09:41 Exaga> i assume it doesn't
09:41 Exaga> normally i would just delete/re-create the partition and run resize2fs
09:41 Exaga> on raspbian
09:41 Exaga> but i must admit my Debian methods are a little out of date
09:42 Exaga> 99.5% od my hobby work is Slackware ARM based
09:42 jnettlet> so what you want to do is use fdisk to delete that partition and then recreate it to use the full size of the disk.
09:42 Exaga> yes i did that
09:43 jnettlet> okay, then run resize2fs to expand the filesystem to use the full partition
09:43 jnettlet> just resize2fs /dev/mmcblk0p1
09:43 Exaga> debian@clearfog:~$ sudo resize2fs /dev/mmcblk0p1
09:43 Exaga> resize2fs 1.43.4 (31-Jan-2017)
09:43 Exaga> The filesystem is already 261120 (4k) blocks long. Nothing to do!
09:44 jnettlet> oh. run partprobe
09:44 Exaga> ok and then?
09:44 jnettlet> it is possible that the kernel is not autodetecting the repartitioning because it is the main device
09:45 jnettlet> then run the resize2fs command
09:45 Exaga> debian@clearfog:~$ sudo partprobe
09:45 Exaga> debian@clearfog:~$ sudo resize2fs /dev/mmcblk0p1
09:45 Exaga> resize2fs 1.43.4 (31-Jan-2017)
09:45 Exaga> The filesystem is already 261120 (4k) blocks long. Nothing to do!
09:45 Exaga> do you see my dilemma? :>
09:46 jnettlet> can you send me the output of fdisk -l /dev/mmcblk0
09:46 Exaga> sure
09:46 Exaga> debian@clearfog:~$ sudo fdisk -l /dev/mmcblk0p1
09:46 Exaga> Disk /dev/mmcblk0p1: 1020 MiB, 1069547520 bytes, 2088960 sectors
09:46 Exaga> Units: sectors of 1 * 512 = 512 bytes
09:46 Exaga> Sector size (logical/physical): 512 bytes / 512 bytes
09:46 Exaga> I/O size (minimum/optimal): 512 bytes / 512 bytes
09:47 jnettlet> oh it is seeing the card as the wrong size. That is a new one
09:47 Exaga> hold on...
09:47 Exaga> debian@clearfog:~$ sudo fdisk -l /dev/mmcblk0
09:47 Exaga> Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
09:47 Exaga> Units: sectors of 1 * 512 = 512 bytes
09:47 Exaga> Sector size (logical/physical): 512 bytes / 512 bytes
09:47 Exaga> I/O size (minimum/optimal): 512 bytes / 512 bytes
09:47 Exaga> Disklabel type: dos
09:47 Exaga> Disk identifier: 0x12f90f9d
09:47 Exaga> Device Boot Start End Sectors Size Id Type
09:47 Exaga> /dev/mmcblk0p1 8192 2097151 2088960 1020M 83 Linux
09:47 Exaga> ** Disk /dev/mmcblk0: 7.4 GiB
09:47 Exaga> it sees the 8GB card
09:48 jnettlet> okay. so it isn't seeing the partition change
09:48 Exaga> but for some reason i cannot resize the only partition
09:48 jnettlet> after you make the changes with fdisk and save them check dmesg for errors
09:48 Exaga> ok 1 min
09:50 Exaga> haha there are no errors
09:50 Exaga> not a single error
09:51 Exaga> hold on let me try a reboot
09:52 Exaga> nope... not booting
09:53 Exaga> rewriting the image
09:53 Exaga> i will attempt it using root user instead of sudo
09:53 jnettlet> Exaga: if you have another linux machine you may want to try this from that machine.
09:53 Exaga> jnettlet: i have several, over a dozen :>
09:54 jnettlet> I have to step out for about 40 minutes. I will check back in a bit. let me know how it goes.
09:54 Exaga> will do and thanks jnettlet :>
11:47 Exaga> jnettlet: solution - FINALLY!
11:48 Exaga> on Ubuntu; "apt install cloud-guest-utils"
11:49 Exaga> then ...
11:49 Exaga> root@ubuntu:~# growpart /dev/sdc 1
11:49 Exaga> CHANGED: partition=1 start=8192 old: size=2088960 end=2097152 new: size=15515615 end=15523807
11:50 Exaga> root@ubuntu:~# fdisk -l /dev/sdc
11:50 Exaga> Disk /dev/sdc: 7.4 GiB, 7948206080 bytes, 15523840 sectors
11:50 Exaga> Disk model: STORAGE DEVICE
11:50 Exaga> Units: sectors of 1 * 512 = 512 bytes
11:50 Exaga> Sector size (logical/physical): 512 bytes / 512 bytes
11:50 Exaga> I/O size (minimum/optimal): 512 bytes / 512 bytes
11:50 Exaga> Disklabel type: dos
11:50 Exaga> Disk identifier: 0x12f90f9d
11:50 Exaga> Device Boot Start End Sectors Size Id Type
11:50 Exaga> /dev/sdc1 8192 15523806 15515615 7.4G 83 Linux
11:53 Exaga> root@ubuntu:~# fdisk -l /dev/sdc
11:53 Exaga> Disk /dev/sdc: 7.4 GiB, 7948206080 bytes, 15523840 sectors
11:53 Exaga> Disk model: STORAGE DEVICE
11:53 Exaga> Units: sectors of 1 * 512 = 512 bytes
11:53 Exaga> Sector size (logical/physical): 512 bytes / 512 bytes
11:53 Exaga> I/O size (minimum/optimal): 512 bytes / 512 bytes
11:53 Exaga> Disklabel type: dos
11:53 Exaga> Disk identifier: 0x12f90f9d
11:53 Exaga> Device Boot Start End Sectors Size Id Type
11:53 Exaga> /dev/sdc1 8192 15523806 15515615 7.4G 83 Linux
11:53 Exaga> err.... sorry
11:53 Exaga> debian@clearfog:~$ sudo fdisk -l
11:53 Exaga> Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
11:53 Exaga> Units: sectors of 1 * 512 = 512 bytes
11:53 Exaga> Sector size (logical/physical): 512 bytes / 512 bytes
11:53 Exaga> I/O size (minimum/optimal): 512 bytes / 512 bytes
11:53 Exaga> Disklabel type: dos
11:53 Exaga> Disk identifier: 0x12f90f9d
11:53 Exaga> Device Boot Start End Sectors Size Id Type
11:53 Exaga> /dev/mmcblk0p1 8192 15523806 15515615 7.4G 83 Linux
11:54 Exaga> there you go. all up and running using the new partition parameters
11:54 Exaga> it's a bit of a ball-ache resizing the partitions on the clearfog debian image
11:55 Exaga> but now it's done... no more problems :D
12:06 jnettlet> Exaga: glad it is working. I will have our buildmaster look at why the auto-resizing isn't working
12:07 Exaga> great. one thing i noticed.... before resizing the partitions all the network port LEDs are lit up and afterwards they are not
12:07 Exaga> i can still log in remotely and work on it just fine
12:12 Exaga> ok cool...
12:12 Exaga> root@clearfog:~# resize2fs /dev/mmcblk0p1
12:12 Exaga> resize2fs 1.43.4 (31-Jan-2017)
12:12 Exaga> Filesystem at /dev/mmcblk0p1 is mounted on /; on-line resizing required
12:12 Exaga> old_desc_blocks = 1, new_desc_blocks = 1
12:12 Exaga> The filesystem on /dev/mmcblk0p1 is now 1939451 (4k) blocks long.
12:12 Exaga> NOW it's working :>
12:21 Exaga> jnettlet: you can also use this growpart command on-the-fly without umount - i just tried it and it's working as expected
12:21 jnettlet> good to know. I will pass it along
12:22 Exaga> thank you, as always, for your time and assistance
12:28 jnettlet> anytime