farshid_mi
Posts: 4
Joined: Fri Sep 23, 2016 10:10 am

How to create a custom OS / RASPBERIAN

Mon Nov 20, 2017 6:13 am

Hi,
I want to customize raspbian (noobos) and in the manual (https://github.com/raspberrypi/noobs) I cant understand what is following steps :



To create the boot tarball you will need to run bsdtar --numeric-owner --format gnutar -cpf <label>.tar . at the root directory of the boot partition of your custom OS version. You should then compress the resulting tarball with xz -9 -e <label>.tar.


To create the root tarball you will need to run bsdtar --numeric-owner --format gnutar --one-file-system -cpf <label>.tar . from within the root filesystem of your custom OS version. You should then compress the resulting tarball with xz -9 -e <label>.tar.


could you pls explain these command and provide how exact command is,

regards

W. H. Heydt
Posts: 10999
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How to create a custom OS / RASPBERIAN

Mon Nov 20, 2017 6:41 am

First, NOOBS isn't an OS. Or rather more accurately, it is a minimal OS whose sole purpose and resources are to install OSes.

"tar" is an acronym for "tape archive". "bsdtar" is just the Berkeley Software Distribution (bsd) version of tar. A "tarball" is a archive usually having many files in it. You can read up on what the various flags on it are by running the command "man bsdtar". "xz" is a compress/decompress program, like zip, gzip, or zoo. Again, "man xz" will provide information about what the various control flags do.

What it boils down to is that you need a file for each resulting partition. One partition is going to be the FAT boot partition. The other is going to be the Ext4 root partition. The way you make each of is to create a tarball for each and then compress it. The installer (e.g. NOOBS) knows how to decompress and then untar the archive into disk partitions.

A word of caution....if these tools are unfamiliar to you, then you probably aren't ready to build your own system yet.

Edit it add... It appears that bsdtar is not a default component of Raspbian. It would have to be installed before use or being able to look at the man page for it. "apt-cache search bsdtar" will give a short description.

farshid_mi
Posts: 4
Joined: Fri Sep 23, 2016 10:10 am

Re: How to create a custom OS / RASPBERIAN

Mon Nov 20, 2017 7:42 am

Thank a lot, :D :D
I know noobs is just an installer.
I can't understand flags like :--numeric-owner --format gnutar -cpf


assume I installed raspbian (with noobs) then install some software like php ,... on raspbian then install bsdtar , could you please write command that create these file.

User avatar
rpdom
Posts: 15397
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to create a custom OS / RASPBERIAN

Mon Nov 20, 2017 7:58 am

These are options to the bsdtar command.

--numeric-owner means that the "owner" of each file is stored in the archive as the UID (UserID) number, not the name of the user.

--format gnutar means that the archive file will be generated in a specific version of the "tar" format.

-cpf something is a combination of three single letter options.

-c means "Create a new archive file"
-p means "Preserve the permissions of each file"
-f something means "Write the output to a file called 'something'"

farshid_mi
Posts: 4
Joined: Fri Sep 23, 2016 10:10 am

Re: How to create a custom OS / RASPBERIAN

Mon Nov 20, 2017 10:21 am

thanks a lot , :)

Rellik8821
Posts: 6
Joined: Thu Jan 25, 2018 6:51 pm

Re: How to create a custom OS / RASPBERIAN

Fri Jan 26, 2018 7:16 am

hello,
i use this tutorial https://github.com/raspberrypi/noobs/wi ... n-examples

but but error on sudo bsdtar --numeric-owner --format gnutar -cpf /tmp/boot.tar
bsdtar: no files or directories specified


i'm in /media/USER/BOOT

User avatar
procount
Posts: 1782
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: How to create a custom OS / RASPBERIAN

Fri Jan 26, 2018 7:38 am

At the end of that line after 'tar' there should be a space followed by a full stop (which means: tar all the files from "this directory" & below)
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

Rellik8821
Posts: 6
Joined: Thu Jan 25, 2018 6:51 pm

Re: How to create a custom OS / RASPBERIAN

Fri Jan 26, 2018 9:04 pm

thanks.

" ." was missing

correcct is.

Code: Select all

bsdtar --numeric-owner --format gnutar -cpf /tmp/boot.tar .

Return to “Beginners”