This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

sitara flasher initramfs will mount with userid (uid) and groupid(gid) as 1000 by default.

Other Parts Discussed in Thread: UNIFLASH

Hi All,

I'm using sitara flasher initramfs for flashing images to eMMC by using uniflash tool which is provided in following link

gforge.ti.com/.../sitara_flasher_initramfs_v1.1.tar.gz

I build the images as the instructions provided in the following link

http://processors.wiki.ti.com/index.php/Sitara_Linux_Program_the_eMMC_on_Beaglebone_Black

Successfully booted and able to flash the eMMC. but it mounts the files system with uid(userid) and gid(groupid) as 1000.

What is the issue. where i need to check to fix it. because the user and group for it is 'root' means should be '0'

Regards

Thiru N

  • Hi,

    So what is your question?
  • Hi,

    Why the 1000 is assigned as uid and gid while mounting initrd filesystem ? Where should i look to fix it ?

    Regards
    Thiru N
  • Hello Thiru,

    Please check your U-Boot environments and /etc/fstab.

    Best regards,
    Kemal

  • Hi Kemal,

    Thanks for your response.

    The /etc/fstab is

    # stock fstab - you probably want to override this with a machine specific one

    rootfs               /                    auto       defaults              1  1
    proc                 /proc                proc       defaults              0  0
    devpts               /dev/pts             devpts     mode=0620,gid=5       0  0
    usbfs                /proc/bus/usb        usbfs      defaults              0  0
    tmpfs                /var/volatile        tmpfs      defaults,size=16M     0  0
    tmpfs                /dev/shm             tmpfs      mode=0777             0  0
    tmpfs                /media/ram           tmpfs      defaults,size=16M     0  0

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


    cat /proc/cmdline

    console=ttyO1,115200n8 rootfstype=ramfs

    But still it mounts with 1023 as uid and gid

    root@am335x-evm:~# ls -lrt /
    dr-xr-xr-x   45 root     root             0 Jan  1  1970 proc
    dr-xr-xr-x   12 root     root             0 Jan  1  2000 sys
    drwxrwxr-x   18 1023     1023             0 Jan  1  2000 etc
    lrwxrwxrwx    1 root     root             8 Jan  1  2000 tmp -> /var/tmp
    drwxr-xr-x    9 root     root          2520 Feb 17 19:03 dev
    drwxrwxr-x    7 1023     1023             0 Nov 11  2015 var
    drwxrwxr-x    8 1023     1023             0 Nov 11  2015 usr
    drwxrwxr-x    2 1023     1023             0 Nov 11  2015 sbin
    drwxrwxr-x    2 1023     1023             0 Nov 11  2015 mnt
    drwxrwxr-x   10 1023     1023             0 Nov 11  2015 media
    drwxrwxr-x    5 1023     1023             0 Nov 11  2015 lib
    lrwxrwxrwx    1 1023     1023            10 Nov 11  2015 init -> /sbin/init
    drwxrwxr-x    3 1023     1023             0 Nov 11  2015 home
    drwxrwxr-x    2 1023     1023             0 Nov 11  2015 boot
    drwxrwxr-x    2 1023     1023             0 Nov 11  2015 bin

    Please let me know what changes need to do to fix it ?

    Regards,

    Thiru N

  • Have you extracted the initramfs files with sudo in this step:


    4. Extract the tar.gz to a folder:


    Create a folder somewhere convenient:

    mkdir sitara_flasher_initramfs

    Extract the files to that folder:

    sudo tar xjf sitara_flasher_initramfs_rev_1.0.tar.gz -C sitara_flasher_initramfs

  • Hi Kemal,

    Yes, it extracted with sudo only.

    but its mounting some time with 1000 and some time with 1023

    can you help me to know the root cause of it ?

    Regards,

    Thiru

  • I suppose 1023 is your current UID in the host machine.

    Could you get your UID and GID by this commands

    id -u
    id -g

    and place these IDs here:

    in order to map them to UID 0

  • Hello Kemal,

    Thanks for your solution.

    Regards,

    Thiru N