WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: remastering problem with permissions  (Read 2386 times)

Offline rkogut

  • Newbie
  • *
  • Posts: 2
remastering problem with permissions
« on: May 18, 2013, 03:17:13 PM »
Hello

I have a serious problem with remastering Tiny Core Linux. I spent over 8 hours to fix this but no effect. Maybe someone can help me.
I need just iso of 64bit pure core server (without gui) but I want to add some my scripts and binaries to filesystem i.e to /home/tc/myfiles

So i decide to follow this script/tutorial (https) gist.github.com/Jared314/1273268
and works fine (after changing download urls)

So now I'm able to create 64bit pure core OS iso just by replacing core.gz and vmlinuz files to downloaded core64.gz and vmlinuz64. That's greate.

And I thought I can perform remastering by simply unpacking core64.gz, changing something at tiny's filesystem then pack it again. But it doesn't work.
After booting OS from ISO (virtualbox) I get :
"login : chdir (/): Permission denied"

I follow the wiki's tutorial : wiki.tinycorelinux.net/wiki:remastering but this error occurs.

All my steps :

#steps 1-17 are from (https) gist.github.com/Jared314/1273268

1. cd /tmp/
2. mkdir new
3. cd new
4. wget http:// distro.ibiblio.org/tinycorelinux/4.x/x86/release/Core-current.iso
5. wget http:// distro.ibiblio.org/tinycorelinux/4.x/x86/release/distribution_files/core64.gz
6. wget http:// distro.ibiblio.org/tinycorelinux/4.x/x86/release/distribution_files/vmlinuz64
7. 7z x Core-current.iso -ocore-current
8. rm -rf core-current/[BOOT]
9. chmod 744 core-current/boot/isolinux/isolinux.bin
10. rm core-current/boot/core.gz
11. rm core-current/boot/vmlinuz
12. cp core64.gz core-current/boot/core64.gz
13. cp vmlinuz64 core-current/boot/vmlinuz64
14. sed 's/core.gz/core64.gz/g;s/vmlinuz/vmlinuz64/g' core-current/boot/isolinux/isolinux.cfg > core-current/boot/isolinux/isolinux64.cfg
15. rm core-current/boot/isolinux/isolinux.cfg
16. mv core-current/boot/isolinux/isolinux64.cfg core-current/boot/isolinux/isolinux.cfg
17. mkisofs -l -J -R -r -V TC-Core64 -no-emul-boot -boot-load-size 4 \
-boot-info-table -b boot/isolinux/isolinux.bin \
-c boot/isolinux/boot.cat -o core64-current.iso core-current

#Now i have /tmp/new/core64-current.iso and it works
#but I want to remastering so i do what wiki says wiki.tinycorelinux.net/wiki:remastering :


18. cp /tmp/new/core64.gz /tmp/
19. mkdir /tmp/extract
20. cd /tmp/extract
21. zcat /tmp/core64.gz | sudo cpio -i -H newc -d

#now i have tiny's filesystem in /tmp/extract where i want to add some my files (to i.e /home/tc/myfiles)
#but even without any additional files next steps dont work.

22. sudo find | sudo cpio -o -H newc | gzip -2 > ../core64-remastered.gz
23. cd /tmp
24. advdef -z4 core64-remastered.gz
25. cp core64-remastered.gz new/core-current/boot/core64.gz
26. cd /tmp/new
27. mkisofs -l -J -R -r -V TC-Core64 -no-emul-boot -boot-load-size 4 \
-boot-info-table -b boot/isolinux/isolinux.bin \
-c boot/isolinux/boot.cat -o core64-current.iso core-current

#Now I have also file /tmp/new/core64-current.iso but it doesnt work.
#When I run this image this appears :
# "login : chdir (/): Permission denied"

what  am i doing wrong

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: remastering problem with permissions
« Reply #1 on: May 18, 2013, 03:46:29 PM »
22. sudo find | sudo cpio -o -H newc | gzip -2 > ../core64-remastered.gz

should be:
Code: [Select]
find | sudo cpio -o -H newc | gzip -2 > ../core64-remastered.gzi.e. without the first "sudo"

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: remastering problem with permissions
« Reply #2 on: May 18, 2013, 04:19:36 PM »
The default permissions vary a bit depending on your host distro. Double-check that the dir /tmp/extract is 775 root/root.
The only barriers that can stop you are the ones you create yourself.

Offline rkogut

  • Newbie
  • *
  • Posts: 2
Re: remastering problem with permissions
« Reply #3 on: May 18, 2013, 04:38:47 PM »
Thank you both to you.

The default permissions vary a bit depending on your host distro. Double-check that the dir /tmp/extract is 775 root/root.

That was the problem. It was 770 and root was not the owner.

best regards