![]() We’re almost done, but before the image is ready, we also need to change something on the boot partition, namely the cmdline.txt. Now we can unmount these filesystems and remove the temporary file we created before umount /media/user/rootfs Rsync -axv /media/user/tmp /media/user/rootfs Make sure to use the right loop number (same as before) since you are removing all data on it! umount /media/user/rootfs Now we can change the file system of the Raspbian image and copy the files back. If your SD-card doesn’t support TRIM, you can leave out the discard option, but most SD-cards have it, so most of the times you can keep it. To the following /dev/sda1 / f2fs defaults ,noatime ,discard 0 1 So we open /media/user/tmp/etc/fstab using vim and change this line /dev/sda1 / ext4 defaults ,noatime 0 1 Now we need to change the filesystem entry in fstab as well. Sudo rsync -axv /media/user/rootfs /media/user/tmp This is enough for the light image, but make sure to change the count if you have a larger image. Next up we create a temporary file based filesystem of about 1.8Gb to store the data so we can change the root partition filesystem. Mount /dev/mapper/loop0p2 /media/user/rootfs Note down the loop device and execute the following commands to mount the root filesystem of the pi image (we use loop0 here, make sure to change it to your situation) mkdir /media/user/rootfs As root execute the following kpartx -av /home/user/Downloads/raspbian.img To start, we need to mount the image, but since it contains multiple partitions we’ll create some loop devices first. Now we can start to change the filesystem. Next, download the newest Raspbian image from the official download page. Make sure you have an empty micro SD-card of at least 8GB (I’ll use one of 32GB). There are already tutorials out there of how to change your working Raspberry Pi file system use F2FS, but since there aren’t any official Raspbian images using F2FS, I’ll explain the steps of changing the official image to use F2FS. This means that the memory of a Raspberry Pi can last longer, which is a win. ![]() The F2FS filesystem was developed specifically for flash memory like SD-cards. Anyone can make a mistake.Changing the Raspberry Pi image filesystem to F2FS Intro I just thought this story might be interesting. Boot is now normal speed, and gparted finds my 7 partitions now. Yes I had to type the whole 90 lines of wipefs. So back to SystemRescueCD, and do from there wipefs -o 0x7dc00 /dev/sda Wipefs: error: /dev/sda: probing initialization failed: Device or resource busyīut, hang on, the disk is mounted and it can not do it from within Debian We can use wipefs to remove these zfs signatures as follows wipefs -o 0x7dc00 /dev/sda Sda 0x1fe lists many items that are called signatures… most of them zfs_member, but at the end my GPT partition table, another copy of the GPT partition table at the top of the disk, and the PMBR (protective MBR). Now, wipefs sounds like a dangerous tool, and it is, so another clonezilla backup first. much research, and I finally find a tool called wipefs which I can use to check the disk. What is going on? There must be some residue of ZFS on the disk?.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |