Score:0

having the SD card as ext4 file system in Ubuntu

ch flag

I am completely new in Ubuntu. I want to write Bootable Image of Ubuntu on SD Card. This is what I have done

1- I have downloaded the base Ubuntu and build my own ubuntu "ubuntu_rootfs.tar.gz"
2- Create an ext4 file system named ubuntu.ext4 with dd command   "dd if=/dev/zero of=ubuntu18_rootfs.ext4 bs=1297M count=3"
3- format ubuntu.ext4 as EXT4 file System
4- create a temporary Folder rootfs_tmp
5- mount the ubuntu.ext4 in rootfs_tmp
6- untar the "ubuntu_rootfs.tar.gz" into rootfs_tmp
7- umount the rootfs_tmp

but what if I want yo have the built Ubuntu on a real SD Card? is it possible to have a SD Card as a ext4 file system ?

C.S.Cameron avatar
cn flag
I love reinventing the wheel myself sometimes. For a simple method of puttin the Full install of Ubuntu on a SD card see: https://askubuntu.com/questions/1300454/easy-full-install-usb-that-boots-both-bios-and-uefi. For a more traditional method of putting the Full install on a SD card see: https://askubuntu.com/questions/1217832/how-to-create-a-full-install-of-ubuntu-20-04-to-usb-device-step-by-step. To build a Persistent Live SD card from scratch see: https://askubuntu.com/questions/1227221/simple-hand-made-persistent-usb-that-boots-either-bios-or-uefi.
C.S.Cameron avatar
cn flag
Or you can directly boot ISO files with a Persistent partition: https://askubuntu.com/questions/1269462/bios-uefi-template-image-for-booting-iso-files.
Score:1
cn flag

Blockquote but what if I want yo have the built Ubuntu on a real SD Card? is it possible to have a SD Card as a ext4 file system ?

I have not tried what you are trying... but I have formatted a microSD card into Ext4 to test if my android tablet would support it. So yes, you can format an SD card into ext4

Good luck!

vanadium avatar
cn flag
It would eventually be good to add that putting such "heavy" filesystem on an SD card is typically not the optimal way to go. But yes, one can simply put any file system on an SD card as on any other storage medium.
user1366177 avatar
cn flag
@vanadium 'such "heavy" filesystem on an SD card'... It depends... with the size and speed of SD cards these days... FAT32 is great for smaller files on a smaller SD cards... but on a 2Tb SD card? (Sure... there's exFAT... but there are cases where ext4 has advantages...)
vanadium avatar
cn flag
I didn't know such large SD cards existed. Still thinking in terms of 64 GB ;)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.