2

I have created a Live USB with Linux Mint 17 “Qiana” Xfce 64-bit using Unetbootin, and booted successfully (more than once). Working with a large table sheet OpenOffice froze and the whole system became unresponsive. I could not use the magic SysRq key combination to shutdown the OS, and had to hard reset the PC.

When restarting the PC did not boot from USB, and has not since. No error message is shown, and PC continues to boot from hard drive.

BIOS is set to boot from USB device. I have tried booting with another laptop to no avail.

I have a strong suspicion that this has to do with file permissions. In Nautilus all files and folders appear to be locked, see screenshot. Gparted also shows a key symbol. (Boot flag is set.)

Nautilus screenshot

List output is:

drwxr-xr-x 3 root root      4096 Sep 16 12:49 boot
drwxr-xr-x 2 root root      4096 Sep 16 12:53 casper
-rw-r--r-- 1 root root 385875968 Sep 16 12:54 casper-rw
drwxr-xr-x 3 root root      4096 Sep 16 12:49 dists
drwxr-xr-x 3 root root      4096 Sep 16 12:49 EFI
-rw-r--r-- 1 root root      1756 Sep 16 12:53 extlinux.conf
drwxr-xr-x 2 root root      4096 Sep 16 12:53 isolinux
-r--r--r-- 1 root root     32768 Sep 16 12:53 ldlinux.sys
drwx------ 2 root root     16384 Sep 16 12:46 lost+found
-rw-r--r-- 1 root root     21113 Jun 23  2014 MD5SUMS
-rw-r--r-- 1 root root     55012 Sep 16 12:53 menu.c32
drwxr-xr-x 5 root root      4096 Sep 16 12:49 pool
drwxr-xr-x 2 root root      4096 Sep 16 12:53 preseed
-rw-r--r-- 1 root root       220 Jun 23  2014 README.diskdefines
-rw-r--r-- 1 root root      1756 Sep 16 12:53 syslinux.cfg
-rw-r--r-- 1 root root      9699 Sep 16 12:53 ubnfilel.txt
-rw-r--r-- 1 root root  20452646 Jun 23  2014 ubninit
-rw-r--r-- 1 root root   5777056 Jun 23  2014 ubnkern
-rw-r--r-- 1 root root       837 Sep 16 12:49 ubnpathl.txt

How can I make the Live USB boot again?

UPDATE 2015-09-17 19:29 UTC

I have created a second Live USB with the same ISO file and compared the content of the two (linux-mint-17a and linux-mint-17b).

  1. First is that actually Byte Commander is right and not all files on the drive should be owned by user. This is the ls -l output for the virgin Live USB (linux-mint-17b):

    drwxr-xr-x 3 root root        4096 Sep 17 17:45 boot
    drwxr-xr-x 2 root root        4096 Sep 17 17:47 casper
    -rw-r--r-- 1 root root 10484711424 Sep 17 18:05 casper-rw
    drwxr-xr-x 3 root root        4096 Sep 17 17:45 dists
    drwxr-xr-x 3 root root        4096 Sep 17 17:45 EFI
    -rw-r--r-- 1 root root        1756 Sep 17 17:48 extlinux.conf
    drwxr-xr-x 2 root root        4096 Sep 17 17:47 isolinux
    -r--r--r-- 1 root root       32768 Sep 17 17:48 ldlinux.sys
    drwx------ 2 root root       16384 Sep 17 17:21 lost+found
    -rw-r--r-- 1 root root       21113 Jun 23  2014 MD5SUMS
    -rw-r--r-- 1 root root       55012 Sep 17 17:48 menu.c32
    drwxr-xr-x 5 root root        4096 Sep 17 17:45 pool
    drwxr-xr-x 2 root root        4096 Sep 17 17:47 preseed
    -rw-r--r-- 1 root root         220 Jun 23  2014 README.diskdefines
    -rw-r--r-- 1 root root        1756 Sep 17 17:48 syslinux.cfg
    -rw-r--r-- 1 root root        9699 Sep 17 17:47 ubnfilel.txt
    -rw-r--r-- 1 root root    20452646 Jun 23  2014 ubninit
    -rw-r--r-- 1 root root     5777056 Jun 23  2014 ubnkern
    -rw-r--r-- 1 root root         837 Sep 17 17:45 ubnpathl.txt
    

The only difference to my first Live USB is the size of casper-rw (because the second flash drive holds 32 GB while the first flash drive was only 2 GB, so I upped the persistence file). As you can see: all files and folders are owned by root and: yes, ldlinux.sys file permissions are read-only (-r--r--r--).

  1. I have run a check on the MD5SUMS and everything came out OK. md5sum only gives out a “WARNING: 6 lines are improperly formatted” but that is nothing to be concerned about, as this is caused by the first six instructional lines for humans to read in the MD5SUMS file as per this forum post

  2. I compared the file structure of the two mounted drives and found them to be identical. I compared the content and found differences:

    user@box2:~$ diff -rq /media/user/linux-mint-17a /media/user/linux-mint-17b
    Files /media/user/linux-mint-17a/casper-rw and /media/user/linux-mint-17b/casper-rw differ
    Files /media/user/linux-mint-17a/ldlinux.sys and /media/user/linux-mint-17b/ldlinux.sys differ
    diff: /media/user/linux-mint-17a/lost+found: Permission denied
    diff: /media/user/linux-mint-17b/lost+found: Permission denied
    

Since I can't read binary I then hexdumped the content of the ldlinux.sys files into two text files:

xxd /media/user/linux-mint-17a/ldlinux.sys >> ~/ldlinux.sys_1.txt
xxd /media/user/linux-mint-17b/ldlinux.sys >> ~/ldlinux.sys_2.txt

and compared the content of the ldlinux.sys files – they differ! see pastebin (I only included the relevant sections).

Why didn't this show up when I checked the MD5SUMS? Because ldlinux.sys is not listed.

I would like to replace the file ldlinux.sys on linux-mint-17a to see if this makes the Live USB bootable again, but I see no way to do this. It is apparently untouchable since not even root can chown or chmod it.

UPDATE 2015-09-17 21:10 UTC

I have been able to remove ldlinux.sys on linux-mint-17a by removing the immutable flag, and replaced it with ldlinux.sys of linux-mint-17b. linux-mint-17a does not boot (error message “Missing operating system”).

marianoju
  • 1,515
  • We're sorry, but this site is all about Ubuntu and its official derivatives as posted on https://wiki.ubuntu.com/UbuntuFlavors so Mint is off-topic here as well. However, on [unix.se], a sister site to Ask Ubuntu, they're very good at all varieties of Linux and Unix, so you might be better off there. ;-) – Fabby Jan 18 '16 at 17:58

1 Answers1

0

This is a simple fix, you will just need 3 things.

1) Root access. 2) A directory path to your flashdrive. 3) Your profile name (A.K.A The user name)

In this case I will use USER as the user name, but make sure you replace USER with whatever your user-name is.

I will be using /home/USER/media/flashdrive/..... To represent the directory to your flashdrive, again make sure to replace /home/USER/media/flashdrive with your directory to your flashdrive.

    cd /home/USER/media/flashdrive
    sudo -s
    chown USER:USER boot casper dists EFI isolinux pool preseed casper-rw extlinux.conf ldlinux.sys MD5SUMS menu.c32 README.diskdefines syslinux.cfg ubnfilel.txt ubninit ubnkern ubnpathl.txt
David
  • 3,367
  • I suspected as much. But this does not (yet) solve my problem. I can not change ownership of ‘ldlinux.sys’ (since root has only read permission): chown: changing ownership of ‘ldlinux.sys’: Operation not permitted.

    Error shown during boot up:

    Missing operating system.

    I tried to sudo chmod 644 ldlinux.sys but again chmod: changing permissions of 'ldlinux.sys': Operation not permitted. How do I get out of this? (BTW there is a typo in your answer: ‘ubnfiel.txt’ ought to be ‘ubnfilel.txt’.)

    – marianoju Sep 17 '15 at 11:46
  • @mariano Okay simply do sudo umount -a then do mount -o rw,remount / Then try the solution again. Make sure to do the entire bold text as the command. – David Sep 17 '15 at 12:05
  • This did not work, see pastebin. In short: only root can mount -o rw,remount /, and even then changing ownership of ‘ldlinux.sys’: Operation not permitted. – marianoju Sep 17 '15 at 13:10
  • I did sudo umount -a and sudo mount -o rw,remount / (as you can see in the pastebin). changing ownership of ‘ldlinux.sys’ still is Operation not permitted. – marianoju Sep 17 '15 at 13:26
  • sudo chown root ldlinux.sys then sudo chmod 777 ldlinux.sys and then do sudo mount -o rw,remount / – David Sep 17 '15 at 14:12
  • I appreciate your interest and effort, @david-cole, but we are moving in circles. I can neiter change ownership nor change file permission on ldlinux.sys, not as a user, not as root. I have tried sudo chown root ldlinux.sys; sudo chmod 777 ldlinux.sys; sudo mount -o rw,remount / (see this pastebin) and I have tried sudo umount -a; sudo mount -o rw,remount /; sudo chown root ldlinux.sys; sudo chmod 777 ldlinux.sys (see this pastebin). Neiter works. ldlinux.sys appears to have become untouchable. – marianoju Sep 17 '15 at 16:12
  • @marianoju What does getfacl ldlinux.sys tell you? – Byte Commander Sep 17 '15 at 16:54
  • @DavidCole Are you sure that everything on this drive should be user-owned? I don't know, but it looks not right to me... Please correct me if I'm wrong and link me a reference. – Byte Commander Sep 17 '15 at 17:01
  • @ByteCommander For loading a bootable drive, it is best to have everything user owned. For debugging and such. – David Sep 17 '15 at 18:12
  • @ByteCommander: getfacl ldlinux.sys gives me:

    # owner: root # group: root user::r-- group::r-- other::r--

    By default all files and folders are owned by root and: yes, ldlinux.sys file permissions are read-only (-r--r--r--). See update above for details.

    – marianoju Sep 17 '15 at 19:22
  • ACLs seem fine, they don't restrict anything uncommon. No idea then... :( – Byte Commander Sep 17 '15 at 19:37
  • I have read @DavidCole's question regarding file ownership change not being permitted, and successfully removed the immutable flag for ldlinux.sys as by kos' instructions (I can not comment on that post since I lack reputation). I have chowned ldlinux.sys to user. Still the Live USB does not boot. (And obviously the USB is not mounted read-only, as muru suggested.) – marianoju Sep 17 '15 at 19:57
  • However immutable flag is present in linux-mint-17b: user@box2:~$ lsattr /media/user/linux-mint-17b/ldlinux.sys ----i--------e-- /media/user/linux-mint-17b/ldlinux.sys – marianoju Sep 17 '15 at 20:01