Results 1 to 34 of 34

Thread: odroid XU4 with Kali 2 , read only file system

  1. #1
    Join Date
    2015-Aug
    Posts
    2

    odroid XU4 with Kali 2 , read only file system

    Hello ,

    I have download the new Kali 2 for Odroid XU3/XU4 here : https://www.offensive-security.com/kali-linux-vmware-arm-image-download/

    I have burnt this with win32diskimager and my EMMC card

    After to login with user root and password toor.
    I do "uname -a" , I see "Linux Kali 3.10.82 #1 SMP PREEMPT Mon Aug 10 13:00:19 CDT 2015 arm71 CNU/Linux"
    I do "pwd" , I see "/root"
    I do "mkdir test" , I see "mkdir cannot create directory "test" : read-only file system"

    i do "startx" , I see :
    Mktemp : failed to create file via template '/tmp/serverauth.XXXXXXXXXX' : read-only file system
    xauth : error in locking authority file
    xauth : error in locking authority file /root/.Xauthority
    xauth : error in locking authority file /root/.Xauthority
    X : cannot stat /tmp/.X11-unix (no such file or directory), aborting.
    xinit : giving up
    xinit : unable to connect to X server : connection refused
    xinit : server error.
    xauth : error in locking authority file /root/.Xauthority

    Then I have tried to do this , but this change nothing :
    I do "mount -o remount /" , I see "[1445.484545] [c5] EXT4-fs (mmcb1k0p2) : re-munted. Opts : dataordered"

    Then I have tried to do this , but i don't understand what this mean, there a error here ? why ? :
    sudo fdisk -l
    Disk /dev/mmcblk0 : 29.1 GB 31000000000000bye , 61074554 sector
    device booot stat end sectors size id type
    /dev/mmcb1k0p1 2048 29654 56265 128m c w95 fat32 (lba)
    /dev/mmcb1k0p1 26265048 265659654 5565656265 6.7G 83 linux
    [ 144541.37675493] Buffer I/O error on device mmcblk0rpmb, logical block 0
    [ 144541.34575493] Buffer I/O error on device mmcblk0rpmb, logical block 0
    disk /dev/mmcb1k0p1 : 4 Mib , 49565 bytes ,8145 sectors

    ...

    /dev/mmcb1k1p1 2048 29654 56265 128m c w95 fat32 (lba)
    /dev/mmcb1k1p2 26265048 265659654 5565656265 6.7G 83 linux



    thank you for your answer

  2. #2
    Join Date
    2015-Aug
    Posts
    2
    the answer of this problem was to do "mount -o remount,rw /"
    Thank you Rosz for your help.

  3. #3
    Join Date
    2014-Feb
    Posts
    309
    Your remount command was incorrect - it needs to be mount -o remount,rw / - but that said, I'm re-doing the xu3 image, so expect a 2.0.1 image in the next day or so with that fixed.

  4. #4
    Join Date
    2014-Sep
    Posts
    15
    I loaded the 2.0.1 image on my XU4, but I am still seeing the RO file system.

  5. #5
    Join Date
    2014-Feb
    Posts
    309
    Can you post dmesg output? 2.0.1 doesn't list ro in it's kernel command line arguments anymore, so I'd like to see what your system is doing.

  6. #6
    Join Date
    2014-Sep
    Posts
    15
    Hi Steev, thanks. Below is a snippet of the dmesg output where it logged mounting the filesystem as RO.

    [ 8.815412] [c7] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
    [ 8.824527] [c7] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
    [ 8.834877] [c7] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
    [ 8.842545] [c7] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
    [ 9.865282] [c7] EXT4-fs (mmcblk0p2): recovery complete
    [ 9.877876] [c7] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 9.886385] [c7] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
    [ 9.897332] [c7] devtmpfs: mounted

    Here is the whole dmesg output.
    http://pastebin.com/Q6yYCKju

  7. #7
    Join Date
    2014-Feb
    Posts
    309
    Interesting that it claims to need recovery.

    Can you do the following:

    mount /dev/mmcblk0p1 /mnt/
    $EDITOR /mnt/boot.ini

    look for the line that is setenv bootrootfs and add rootfstype=ext4 in the quotes?

    That will get rid of the couldn't mount as ext* due to feature incompatibilities part, not that it matters.

    Also, could you run fsck on the /dev/mmcblk0p2 partition (preferably on another linux machine, I'm curious why it thinks it needs recovery)

    I've not seen that here, and I don't have an XU4, and don't run into these issues with my xu3.

  8. #8
    Join Date
    2014-Sep
    Posts
    15
    Here is the setenv entry in the boot.ini:
    setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=/dev/mmcblk0p2 rootwait"

    I also ran fsck from another system, here is the output:
    root@kali:~# fsck /dev/mmcblk0p2
    fsck from util-linux 2.25.2
    e2fsck 1.42.12 (29-Aug-2014)
    /dev/mmcblk0p2: clean, 167814/439776 files, 806915/1758976 blocks

    The card is a SanDisk Ultra 32GB. I have another card at work and will give that one a try as well tomorrow.

  9. #9
    Join Date
    2014-Feb
    Posts
    309
    Right - I'm saying add rootfstype=ext4 to that line.

  10. #10
    Join Date
    2014-Sep
    Posts
    15
    Hey Steev, sorry I totally over looked the line where you asked me to add the rootfstype line. I went ahead and did that last night, booted up the XU4 but the filesystem is still RO. I did check my dmesg to make sure rootfstype=ext4 made it in and it was there. I also grabbed the ubuntu 15.04 image on Hardkernel's website and wrote that to my micro SD card. booted up fine and the filesystem is in RW mode. I am going to look over the boot.ini on the Ubuntu image to see if anything stands out and will let you know.

  11. #11
    Join Date
    2015-Aug
    Posts
    15
    I loaded kali-2.0.1-odroidc.img on my c1+, and I also have this problem.
    root@kali:~# uname -a
    Linux kali 3.10.80 #2 SMP PREEMPT Wed Aug 12 19:52:45 CDT 2015 armv7l GNU/Linux
    root@kali:~# df
    df: cannot read table of mounted file systems: No such file or directory
    root@kali:~# mkdir test
    mkdir: cannot create directory 'test': Read-only file system
    root@kali:~# sudo apt-get update
    Ign http://http.kali.org sana InRelease
    Ign http://http.kali.org sana Release.gpg
    Ign http://http.kali.org sana Release
    Err http://http.kali.org sana/main Sources
    404 Not Found
    Err http://http.kali.org sana/non-free Sources
    404 Not Found
    Err http://http.kali.org sana/contrib Sources
    404 Not Found
    Err http://http.kali.org sana/main armhf Packages
    Could not open file /var/lib/apt/lists/partial/http.kali.org_kali_dists_sana_main_binary-armhf_Packages - open (30: Read-only file system)
    Ign http://http.kali.org sana/contrib Translation-en
    Ign http://http.kali.org sana/main Translation-en
    Ign http://http.kali.org sana/non-free Translation-en
    Err http://http.kali.org sana/non-free armhf Packages
    Could not open file /var/lib/apt/lists/partial/http.kali.org_kali_dists_sana_non-free_binary-armhf_Packages - open (30: Read-only file system)
    Err http://http.kali.org sana/contrib armhf Packages
    Could not open file /var/lib/apt/lists/partial/http.kali.org_kali_dists_sana_contrib_binary-armhf_Packages - open (30: Read-only file system)
    32% [Working]

  12. #12
    Join Date
    2015-Aug
    Posts
    15
    It seems like a lot of people are having the same problem with both raspberry pi and odroid.
    https://forums.kali.org/showthread.p...-kali-rpi2-img

    https://bugs.kali.org/view.php?id=2504
    Hopefully it'll get fixed soon.

  13. #13
    Join Date
    2014-Feb
    Posts
    309
    Ah crud, looks like I missed that in the odroid-c script. I'm building a 2.0.2 release for the odroid-c - for now, can you mount the boot partition and change the ro to rw and see if that affects anything in the boot.ini script?

  14. #14
    Join Date
    2014-Sep
    Posts
    15
    Ok I think I got everything sorted out now. It boots into a RW filesystem without me having to re-mount. This is what my setenv line looks like in my boot.ini
    setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=/dev/mmcblk0p2 rootwait rw fsck.repair=yes"

    I tried different combinations, but this one worked for me. Not sure if fsck.repair=yes is really necessary but I left it there anyway.

  15. #15
    Join Date
    2014-Feb
    Posts
    309
    <delete double post>
    Last edited by steev; 2015-08-18 at 21:47. Reason: double posted :/

  16. #16
    Join Date
    2014-Feb
    Posts
    309
    Interesting, I'll look into it more here dalma, but I don't see that issue at all. I'll try a few more microsd cards, but I only have 1 8GB eMMC module :/

    and sslx, there is an odroid-c1 2.0.2 image out now, please let me know if that works for you.

  17. #17
    Join Date
    2015-Aug
    Posts
    15
    I can't download 2.02 for c1 for some reason.
    It just redirects to empty page?

  18. #18
    Join Date
    2015-Aug
    Posts
    15
    It's interesting.
    The link has a space after http://images.kali.org/.
    If I fix it to http://images.kali.org/kali-2.0.2-odroidc.img.xz.
    It downloads, but the file is only 10mb big. Also I can't unarchive it.

  19. #19
    Join Date
    2014-Feb
    Posts
    309
    Yeah - not sure what happened, somehow when I detached my screen session the upload paused. I'm re-upping it now (and the link will be fixed soon). Sorry guys!

  20. #20
    Join Date
    2015-Aug
    Posts
    15
    The link is fixed, but the file is still 10m even though the webpage indicates 1779M.

  21. #21
    Join Date
    2014-Feb
    Posts
    309
    Yeah, it should be fixed tomorrow - if it isn't poke muts on IRC and mention it to him as well.

  22. #22
    Join Date
    2015-Aug
    Posts
    15
    Thank you. Seems working now.

  23. #23
    Join Date
    2015-Sep
    Posts
    4
    I just loaded up the odroid xu4 and found this forum thread because I am experiencing the same issue. I issued the "mount -o remount,rw /" command without quotes and that worked the first time. I set it up for a reverse ssh phone home experiment and then reboot and now its back to RO. I issued the same command and now I am getting mount can't find/ in /etc/fstab. I go into manually add but its RO so I cant. Any suggestions? I am using 2.0.1 from the odroid xu3/xu4 link on the offsec site. Is there going to be a 2.0.2 or 2.0.3 like there is for the C1?

  24. #24
    Join Date
    2014-Feb
    Posts
    309
    Can you pastebin the output of your dmesg? The odroid images should not be booting RO in 2.0.1 anymore, and I'd like to see your kernel command lines. Also, if you could paste your /boot/boot.ini file -- you'd need to mount the first partition to /boot to do that (something along the lines of mount /dev/mmcblk0p1 /boot )

    You can also try adding rw to the line that says setenv bootrootfs "..." inside the quotes, but that really shouldn't be necessary, but without log file output, I can't really say what you're running into.

  25. #25
    Join Date
    2015-Sep
    Posts
    4
    Here is my boot.ini - I had to plug it into a usb and connect to another linux machine to read it. Its does not look mounted.
    http://pastebin.com/MDns5Rsm

    I could not do anything with dmesg because everything is RO.

  26. #26
    Join Date
    2015-Sep
    Posts
    4
    Adding the rw to the setenv bootrootfs line work!! Thanks!

  27. #27
    Join Date
    2014-Feb
    Posts
    309
    Can you show me dmesg output *without* the rw in the bootrootfs line? I'd really like to see what is going on there. The boot.ini looks correct in that it doesn't have ro in the command line, so I'd like to know what is causing it to mount ro

  28. #28
    Join Date
    2014-Feb
    Posts
    309
    Can you show me dmesg output *without* the rw in the bootrootfs line? I'd really like to see what is going on there. The boot.ini looks correct in that it doesn't have ro in the command line, so I'd like to know what is causing it to mount ro

  29. #29
    Join Date
    2014-Sep
    Posts
    15
    Here's my dmesg output that I just captured without "rw"
    http://pastebin.com/MBcshDc0

  30. #30
    Join Date
    2014-Sep
    Posts
    15
    <duplicate>
    Last edited by dalma; 2015-09-15 at 20:08.

  31. #31
    Join Date
    2014-Feb
    Posts
    309
    Bah, unfortunately the bit i need to see doesn't show up there. All of that SysRq spam is annoying too :/ Ah well, I will probably end up adding a rw to a new image but I can't give a timeframe right now, unfortunately.

  32. #32
    Join Date
    2015-Sep
    Posts
    4
    Here is my dmesg. Sorry for delay but I had to nc it over to another system since I could not write to the system.
    #dmesg 2>&1 |nc ip port < filename.txt #which I know you guys know this, but I did not.
    http://pastebin.com/NPS3JNwB

  33. #33
    Join Date
    2015-Oct
    Posts
    2
    Any updates on this issue? I pulled down the image (2.0.1) a couple of days ago, and it is still exhibiting the same behavior.

  34. #34
    Join Date
    2014-Feb
    Posts
    309
    Quote Originally Posted by Two2FourPT View Post
    Any updates on this issue? I pulled down the image (2.0.1) a couple of days ago, and it is still exhibiting the same behavior.
    I would suggest adding rw to the /boot/boot.ini file - "mount /dev/mmcblk0p1 /boot" to see it. I am not comfortable adding it carte blanch since the init system should be remounting it rw after it runs the scheduled (if any) fsck. It would go in the quotes on the line that starts with setenv bootrootfs.

Similar Threads

  1. USB Drive Read-only file system
    By DreydenGys in forum Installing Archive
    Replies: 0
    Last Post: 2021-01-05, 22:41
  2. Replies: 1
    Last Post: 2020-07-25, 05:28
  3. Replies: 3
    Last Post: 2014-05-26, 21:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •