LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   changing ownership : operation not permitted (http://www.linuxquestions.org/questions/linux-from-scratch-13/changing-ownership-operation-not-permitted-873909/)

janakiramulu 04-09-2011 12:33 AM

changing ownership : operation not permitted
 
hi all
i am here -lfs6.7 @ 5.33. Changing Ownership (pagno-73)

1)I wanna take back up $LFS/tools directory (for use in building future LFS systems), how can i take back up (tools dir)
i mounted pendrive to /tmp
i try to copy the tools dir to /tmp: msg permission denied
lfs:/mnt/lfs$ls
sources tools lfs-packages.tar
lfs:/mnt/lfs$cp -r tools /tmp(usb device mount point)

2)i am try to change the ownership of the $LFS/tools directory to user root by running the following command:

lfs:/mnt/lfs/sources$ chown -R root:root $LFS/tools

output is lenghty,but i am posting last lines only


chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xbn': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xsw': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xw': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/i386linux.xu': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xn': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xr': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xdw': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/i386linux.xn': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/as': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/ar': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/strip': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/ranlib': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/objcopy': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/nm': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/ld': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/objdump': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools': Operation not permitted


why??(what i missed )

druuna 04-09-2011 02:09 AM

Hi,
Quote:

why??(what i missed )
You missed the Note at the beginning of chapter 5.33.

janakiramulu 04-09-2011 04:00 AM

[
 
hi druuna
thanku so much for fast reply

(i am using lfs livecd)
yes that may be the mistake
(present) one terminal is lfs usr,
so i opened new terminal
here i run this
root[ ~ ]#chown -R root:root $LFS/tools
is this fine
i have to do chpter 6 @ root[ ~ ]# only right
-----------------------------------------------
i was expecting abt backup tool dir,can u tell

thanku

druuna 04-09-2011 06:38 AM

Hi,
Quote:

Originally Posted by janakiramulu (Post 4318903)
yes that may be the mistake

I'm sure that is the mistake....

Quote:

here i run this
root[ ~ ]#chown -R root:root $LFS/tools
is this fine
That is the command in the book, just make sure the LFS variable is set (probably to /mnt/lfs).

Quote:

i have to do chpter 6 @ root[ ~ ]# only right
I do believe that is what the note in chapter 5.33 says.

Quote:

i was expecting abt backup tool dir,can u tell
What did you expect? The book only mentions this would be a good point to make a backup.

If you want to make a backup I would suggest the following (as root user):
Code:

cd /mnt
tar jcf lfs.chapter5.tar.bz2 lfs

If, for whatever reason, you want to start at the beginning of chapter 6 again do the following to restore the backup (as root user):
Code:

cd /mnt
rm -rf lfs
tar jxf lfs.chapter5.tar.bz2

Hope this helps.

janakiramulu 04-09-2011 07:04 AM

hi druuna
i exit from lfs user,now
root [ /mnt ]# tar jcf lfs.chapter5.tar.bz2 lfs
output is following

bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: No space left on device
Input file = (stdin), output file = (stdout)

how come this,i made 12gb partition for lfs ,
shall i remove sources dir(all previous pkg untared sources)? in /sources
-------------------------------------------------------------------------

spiky0011 04-09-2011 07:16 AM

You should remove the build dir as you go along

janakiramulu 04-09-2011 07:20 AM

hi druuna
(i am using lfs livecd)

here i just click on logout(on menu),after few seconds
its appear as root[ ~ ]#
here i typed
root[ ~ ]#startx
reslult is
FAT:directory bread(block 5991904) failed
scsi ....rejecting i/o to dead device
.
.
.
.
FAT:directory bread(block 5991904) failed
scsi ....rejecting i/o to dead device
FAT:FAT read failedblocknr 3820)
fatal server error:
could not create lock file in /tmp/.tx0-lock
give up.
xinit:no such file or directory(errno 2):unable to connect to x server
xinit:no such process(errno 3):server error.

something went wrong a?
when i type startx @ root [ ~ ]#
it should appear gui na
whats wrong

spiky0011 04-09-2011 07:25 AM

You need to build blfs yet, The lfs is just the base system

jschiwal 04-09-2011 07:34 AM

Don't use fat. Format the drive in a Linux filesystem. The chown command will not work. The ownership and permissions of directories and files are determined enmass by the mount options.

However, you could backup up files to a fat drive using tar. The ownership and permissions information is written inside the backup.

druuna 04-09-2011 09:33 AM

Hi,

Quote:

Originally Posted by janakiramulu (Post 4319048)
root [ /mnt ]# tar jcf lfs.chapter5.tar.bz2 lfs
output is following

bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: No space left on device
Input file = (stdin), output file = (stdout)

If you are using the liveCD there is indeed no space left to do the tar command (when using /mnt/lfs.chapter5.tar.bz2 as target). You cannot write to a cd, it is a read-only medium.

If you have a memory-stick or thumb drive or whatever, mount it first (for example to /mnt/usbstick), then tar to that mounted directory (again as root):
Code:

cd /mnt
tar jcf /mnt/usbstick/lfs.chapter5.tar.bz2 lfs

PS: You should always remove the build directories after the build (which is mentioned in the book), but you do not need to remove the packages.

Hope this helps.

janakiramulu 04-10-2011 06:09 AM

hi druuna

yester day i told ,i got fat error
so today i started fresh from starting
see 5.33(lfs-6.7)
note(pagen0-73)
The commands in the remainder of this book must be performed while logged in as user root and no
longer as user lfs. Also, double check that $LFS is set in root's environment.

lfs:/mnt/lfs/sources$exit(i exited from lfs)
root[ ~ ]#chown -R root:root $LFS/tools
root[ ~ ]#echo $LFS
its iving /mnt/lfs
it should show root na according to note

janakiramulu 04-10-2011 06:34 AM

hi druuna
one more thing
till chapter 5 only i have to use lfslivecd(without distrubing,without power off)

while doing chapter 6 ,doesnt need to use lfs livecd ?right
is this right what i am saying,
if so how can i start ch6 without using lfscd
plz tell me as above(step wise plz)
thanku

druuna 04-10-2011 07:05 AM

Hi,
Quote:

Originally Posted by janakiramulu (Post 4319839)
lfs:/mnt/lfs/sources$exit(i exited from lfs)
root[ ~ ]#chown -R root:root $LFS/tools
root[ ~ ]#echo $LFS
its iving /mnt/lfs
it should show root na according to note

That depends on what you mean by "it". $LFS/tools should now be owned by root.

Quote:

Originally Posted by janakiramulu
one more thing
till chapter 5 only i have to use lfslivecd(without distrubing,without power off)

while doing chapter 6 ,doesnt need to use lfs livecd ?right
is this right what i am saying

No, that is incorrect, you still need the liveCD.

janakiramulu 04-11-2011 01:36 AM

hi
druuna
thanks for reply

i used lfslivecd(continue) ...(lfs-6.7)

@6.2.2. Mounting and Populating /dev

root [ ~ ]# mount -v --bind /dev $LFS/dev
result is following
/dev on /dev type none (rw,bind)
is this right (i didnt get 'none' word),nothing wrong this one right?

shall i go forward,

druuna 04-11-2011 03:04 AM

Hi,

If there is no error shown you can continue.

The above shown output is not an error, it is the output generated by the -v (verbose) flag.


All times are GMT -5. The time now is 07:41 AM.