cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
327 Views
Registered: ‎09-28-2018

How to check the location and allocated size of home/root folder

Hi.

Sorry for the elementary question.

Using the Zynq(Z-7045) board and Petalinux 2016.2,

I put a file in the home/root directory.

But I don't know where these files are in the filesystem.

 

root@TEST:~# ls -l
-rw-r--r-- 1 root root 395005 Feb 12 20:52 0.gz
-rw-r--r-- 1 root root 16 Jan 1 1970 test.txt

 

root@TEST:~# cat /etc/fstab
# stock fstab - you probably want to override this with a machine specific one

/dev/root / auto defaults 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0

# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0

 

root@TEST:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 376468 0 376468 0% /dev
tmpfs 386072 20 386052 0% /run
tmpfs 386072 16 386056 0% /var/volatile

 

Where is home/root located in the file system?

Also, please tell me how much file size I can put in home/root?

 

Thank you.

0 Kudos
9 Replies
Highlighted
Moderator
Moderator
286 Views
Registered: ‎02-07-2018

Re: How to check the location and allocated size of home/root folder

HI @s3s_elec 

Please just use this below commands to find the location of the file.

locate file_name

find -name file_name

 

For knowing your file size, use this below command.

ls -sh file_name 

du -sh home/root/

 

Note: By defulat locate command will not be presnet in petalinux rootfs, you need enable & build it.

 

Thanks & regards

Araivnd

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

0 Kudos
Highlighted
Visitor
Visitor
251 Views
Registered: ‎09-28-2018

Re: How to check the location and allocated size of home/root folder

Thank you for your reply, Araivnd.

Sorry for the confusing question.

 

The find command shows that the file is in ./home/root .


The "Used" column value for all three items displayed as a result of the df command is less than 0.gz.

Are the files (0.gz, test.txt) elsewhere than these three?

 

root@TEST:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 376468 0 376468 0% /dev
tmpfs 386072 20 386052 0% /run
tmpfs 386072 16 386056 0% /var/volatile

 

If so, why isn't that area displayed by the df command?

 

Thank you.

0 Kudos
Highlighted
Mentor
Mentor
245 Views
Registered: ‎06-16-2013

Re: How to check the location and allocated size of home/root folder

Hi @s3s_elec 

 

You mean evan if linux mount /dev/root as / and there are some files on /, you can't recognize used file size on result of df, right ?

If yes, would you share the following result ?

 

df -k -T

 

Best regards,

0 Kudos
Highlighted
Visitor
Visitor
204 Views
Registered: ‎09-28-2018

Re: How to check the location and allocated size of home/root folder

Thank you for your reply, watari.

 

Sorry for my lack of understanding. Your guess is correct.

I ran the command.

 

root@TEST:~# df -k -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
devtmpfs devtmpfs 376468 0 376468 0% /dev
tmpfs tmpfs 386072 20 386052 0% /run
tmpfs tmpfs 386072 16 386056 0% /var/volatile

 

Thank you.

0 Kudos
Highlighted
Visitor
Visitor
138 Views
Registered: ‎09-28-2018

Re: How to check the location and allocated size of home/root folder

I haven't changed Petalinux's config on mounting the region,

and I haven't run the mount command since boot.

Is /home/root not mounted anywhere?

0 Kudos
Highlighted
Mentor
Mentor
135 Views
Registered: ‎06-16-2013

Re: How to check the location and allocated size of home/root folder

Hi @s3s_elec 

 

Would you share boot log to investigate the root cause, if possible ?

 

Best regards,

0 Kudos
Highlighted
Visitor
Visitor
107 Views
Registered: ‎09-28-2018

Re: How to check the location and allocated size of home/root folder

Thank you for your reply, watari.

 

Please check the boot log.

I have attached the file.

 

Thank you.

0 Kudos
Highlighted
Mentor
Mentor
101 Views
Registered: ‎06-16-2013

Re: How to check the location and allocated size of home/root folder

Hi @s3s_elec 

 

According to your log file, I can't find rootfs and it seems that you don't define rootfs.

Where do you describe your rootfs ?

Also how do you describe it ?

 

Best regards,

 

0 Kudos
Highlighted
Visitor
Visitor
88 Views
Registered: ‎09-28-2018

Re: How to check the location and allocated size of home/root folder

Thank you for your reply, watari.

 

As you say, I have not set up rootfs.

The settings are left at default. 
("base-system-default" is selected(*) for "Filesystem Packages")

I only run "petalinux-config -c rootfs" before building to add my apps.

 

I just want to make space for large files (hundreds of MB).

Also, I do not know the capacity limit of /home/root/ now.

 

I'm sorry I don't know the basics.

I study about rootfs.

 

Thank you.

0 Kudos