WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: vestigial /linuxrc  (Read 1027 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1509
vestigial /linuxrc
« on: February 29, 2024, 08:44:17 PM »
Hello, curaga and Juanito. I'm on TCL15 x86_64, exploring the contents of corepure64.gz for my own education.

I noticed that /linuxrc is a no-op link to busybox:

Code: [Select]
# /linuxrc
linuxrc: applet not found

It turns out TCL's busybox is compiled without the linuxrc applet:

Code: [Select]
# CONFIG_LINUXRC is not set

Code: [Select]
$ busybox --list | grep linux
linux32
linux64
$ busybox.suid --list | grep linux


It seems /linuxrc is a relic from TCL's past. I can confirm that removing it from base system has no ill effects.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: vestigial /linuxrc
« Reply #1 on: March 01, 2024, 12:25:14 AM »
Hi GNUser
linuxrc  also shows up in the kernel sources and vmlinuz.

TC10 32 bit:
Code: [Select]
tc@E310:~$ od -A d -t x1 /mnt/sda1/boot/vmlinuz | grep '1f 8b 08 00'
#        0  1  2  3  4
0014592 00 00 ff e0 1f 8b 08 00 00 00 00 00 02 03 ec 7a
# 14592 + 4 = 14596
tc@E310:~$ dd if=/mnt/sda1/boot/vmlinuz bs=1 skip=14596 | zcat | busybox grep linuxrc
/linuxrc

gzip: stdin: decompression OK, trailing garbage ignored
tc@E310:~$

TC14 64 bit:
Code: [Select]
tc@box:~$ od -A d -t x1 /mnt/sda6/boot/vmlinuz64 | grep '1f 8b 08 00'
#        0  1  2  3  4  5  6  7  8  9 10 11 12
0017088 22 c2 eb 03 f4 eb fd 5a 59 5b 58 c3 1f 8b 08 00
# 17088 + 12 = 17100
tc@box:~$ dd if=/mnt/sda6/boot/vmlinuz64 bs=1 skip=17100 | zcat | busybox grep -o linuxrc
linuxrc
tc@box:~$

Code for searching vmlinuz was found here:
https://stackoverflow.com/a/69801246

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: vestigial /linuxrc
« Reply #2 on: March 01, 2024, 02:51:09 AM »
Yeah a remnant symlink, good find.
The only barriers that can stop you are the ones you create yourself.