You are not logged in.
Pages: 1
I converted from MBR/Syslinux to GPT/Gummiboot, thanks to the help of forum member Head_on_a_Stick.
I'm trying to clean-up my /boot directory and would like to remove the old /boot/syslinux directory. I began by trying to remove the only file in the directory. When I rm the file as root with any of the possible options, terminal consistently reports
cannot remove ‘ldlinux.sys’: Operation not permitted.
The attributes of the file are
-r--r--r-- 1 root root 61440 Oct 16 18:44 ldlinux.sys
I'm stuck. How do I go about removing the file?
Last edited by hcra (2014-11-15 04:46:16)
Offline
You probably need to remove files from within a Live distro as administrator.
do it good first, it will be faster than do it twice the saint
Offline
You probably need to remove files from within a Live distro as administrator.
I tried that, or at least I think did, when I chrooted in to install Gummiboot. I could give it another go I suppose.
[EDIT]removed extraneous information.
Last edited by hcra (2014-11-15 03:13:13)
Offline
# ls -l foo
-r--r--r-- 1 root root 0 Nov 15 04:17 foo
# rm foo
# ls -l foo
ls: cannot access foo: No such file or directory
Am I missing something?
Offline
Am I missing something?
I'm only reporting what terminal reports even with -f. Not sure what to say.
Offline
I'm guessing your boot partition is mounted read only.
What is the output of `mount`?
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
What is the output of `mount`?
See pastebin please.
Offline
Post he output of
ls -l /boot/
Offline
Post the output of
ls -l /boot/
-rw-r--r-- 1 root root 17410352 Nov 2 07:26 initramfs-linux-fallback.img
-rw-r--r-- 1 root root 3409472 Nov 2 07:26 initramfs-linux.img
-rw-r--r-- 1 root root 648704 Oct 12 05:05 intel-ucode.img
drwxr-xr-x 2 root root 4096 Nov 14 12:48 syslinux
-rw-r--r-- 1 root root 4025888 Oct 30 12:51 vmlinuz-linux
Offline
Have you tried removing it from a liveCD / liveUSB? No need to chroot.
Offline
Have you tried removing it from a liveCD / liveUSB?
I'll try straight away and report back.
[EDIT]same result:
Operation not permitted
Last edited by hcra (2014-11-15 03:46:53)
Offline
karol wrote:Have you tried removing it from a liveCD / liveUSB?
I'll try straight away and report back.
[EDIT]same result:
Operation not permitted
I'm going to ask a REALLY stupid question but, hey, SOMEONE has to ask it... (Sorry. )
You are trying to delete the file from your hard drive (that you mount yourself by hand) and NOT the file from the live environment, right?
Last edited by drcouzelis (2014-11-15 04:26:22)
Offline
I'm going to ask a REALLY stupid question …
I already accidentally deleted the same file from the ISO before I realized that is was in the wrong /boot directory (blush). I thought the problem was solved, but alas not. Actually, a really great question!I
I'm booting with Gummiboot on the ISO and my installation.
Offline
The file is set to be immutable, so you must remove that attribute before you can delete it.
# chattr -i ldlinux.sys
# rm ldlinux.sys
Offline
Ah, yes:
$ lsattr /boot/syslinux/ldlinux.sys
----i--------e-- /boot/syslinux/ldlinux.sys
Thanks, circleface.
Offline
The file is set to be immutable, so you must remove that attribute before you can delete it.
Success. That worked. Thanks, Circleface!!
One question: how can you tell that a file is set immutable?
Offline
lsattr will tell you.
Offline
lsattr will tell you.
Thanks for your help, everyone!!
Offline
What do you know. So
-r--r--r--
is like "if you wouldn't mind, please don't modify this file" and
----i--------e--
is like I don't THINK so. This file's going NOWHERE, PUNK. ..?
Offline
pacman used to use immutable file for db lock, but it doesn't anymore:
$ ls -l /var/lib/pacman/db.lck
---------- 1 root root 5 Nov 15 06:04 /var/lib/pacman/db.lck
$ lsattr /var/lib/pacman/db.lck
lsattr: Permission denied While reading flags on /var/lib/pacman/db.lck
U Can't touch this!
$ sudo lsattr /var/lib/pacman/db.lck
-------------e-- /var/lib/pacman/db.lck
Offline
What do you know. So
-r--r--r--
is like "if you wouldn't mind, please don't modify this file" and
----i--------e--
is like I don't THINK so. This file's going NOWHERE, PUNK. ..?
Pretty much. Even with 000 permissions, the root user (or any process running as root) can still read, modify, and delete the file. When set as immutable, nothing can change it.
Offline
when I chrooted in to install Gummiboot
I think the best chance was to mount the partition and delete files without chroot into the partition. Otherwise you may fall into the same permissions problem.
do it good first, it will be faster than do it twice the saint
Offline
Pages: 1