Remote Install with linuxrc on a screenless latop

Hi,

I’m shaking the dust off a previous topic #144532 using linuxrc to remote install tumbleweed. I have a laptop where the screen and LAN are dead but I know the wifi and other operations are still working - might make a nice little file or proxy server which is better than going to land fill.

So I have my tumbleweed ISO on a thumbdrive but I don’t know where to install the /etc/linuxrc.inf file on the thumb drive for linuxrc to pick .

Any ideas please?

Thanks.

OK, I’m stumped. I have read SDB:linuxrc and install.inf. I also found a reference in Advanced linuxrc options..

In that regard I created a info and a linuxrc.conf file in the root of the ISO image that I then burned via isomaster.

The contents of those files is just a simple 1 liner Manual: 1. This is based on the install.inf syntax as well as knowing that if I choose manual=1 in the Yast installer options I get to the linuxrc screen and not the Yast GUI.

But the system still boots immediately into the Yast GUI. I can’t seem to get to over ride things for a customized install via ssh or vnc.

Any ideas?
Thanks.

Where have you found reference to linuxrc.conf? It should be /linuxrc.config in the root of the initrd, not the installation medium.

  // read config from initrd:
  //   - /linuxrc.config
  //   - /etc/linuxrc.d/*

My typo - sorry.

The reference is here.

Ok, I’m going to sound like a fool, but where is the initrd on the ISO?

/boot/x86_64/loader/initrd

bor@bor-Latitude-E5450:~$ xzcat /media/bor/openSUSE-Leap-15.5-NET-x86_64491/boot/x86_64/loader/initrd | LANG=C cpio -i --to-stdout linuxrc.config
KernelPCMCIA:	1
UseUSBSCSI:	1
Product:	openSUSE Leap 15.5
UpdateDir:	/linux/suse/x86_64-leap15.5
MemLoadImage:	358400
MemYaST:	123456
InstsysComplain:	2
InitrdID:	2023-05-23.c455d25b
dud:		disk:/?device=*usb*&all=1&quiet=1
autoyast2:	disk:/autoinst.xml?device=*label/OEMDRV&quiet=1
dud:		disk:/?device=*label/OEMDRV&quiet=1
defaultrepo:	cd:/,hd:/
KexecReboot:    1
PTOptions:	AutoUpgrade,productprofile,addon,XVideo,Screenmode,specialproduct,reboot_timeout,LIBSTORAGE_*,YAST_*,Y2*

# Note: you can put config files also into /etc/linuxrc.d/.
436718 blocks
bor@bor-Latitude-E5450:~$ 

/boot/x86_64/loader/etc/install.inf ?

EDIT: ah wait, you mean I add install.inf to the initrd xz archive file?

Do you know what initrd is and how it is used?

I regret I read about it YEARS ago and have since lost it’s meaning.

From hazy memory it’s the intial ram disk used at boot time before the kernel/OS is loaded? But I’ve never had to touch/play/edit it in the past.

Yes. Today it is (compressed) cpio archive that kernel unpacks in memory and is using as the initial root filesystem. The task of initrd is normally to do whatever is necessary to access and mount the real root and switch to it. The init program is started from this initial root (and in case of the openSUSE installation image init is linuxrc).

So you need to unpack initrd, make necessary modifications, pack it again and replace the original initrd in ISO image. dracut (the tool to create initrd in openSUSE) is using

find . -print0 | sort -z | cpio --null -H newc -o --quiet | $compress

where $compress could e.g. be xz as in the original file. You do not need to compress, it is just to reduce installation image size. The only really important option is probably -H newc (I am not sure whether kernel cpio implementation supports other formats).

Thanks @arvidjaar I really appreciate the help.

I managed to unpack

$xz -dc < initrd | cpio -idmv

and edit the initrd file by adding a /etc/install.inf to it - which has only these 2 lines -

Manual: 1
Textmode: 1

But when I run to pack it again I get this warning about initrd having grown and bytes not copied.

$find . -print0 | sort -z | cpio --null -H newc -o --quiet | xz > initrd
$cpio: File ./initrd grew, 180224 new bytes not copied

The resultant ISO runs in my VM but seems to ignore the install.inf settings and goes straight to the main Yast install page.

Where did it get the data that initrd grew when I deleted the old initrd and is this an issue?

Thanks.

E-h-h … you are trying to include the file initrd into initrd? How is it supposed to work? You need to unpack it into empty directory and certainly do not pack it into a file in the same directory.

According to documentation, this file is created by linuxrc. You need to define them in /linuxrc.config (or, better, add file to /etc/linuxrc.d).

Oops. How’s this -

$find . -print0 | sort -z | cpio --null -H newc -o --quiet | xz > ../initrd
$

I did edit the /linuxrc.config with the two extra lines at the bottom but no luck.

KernelPCMCIA:	1
UseUSBSCSI:	1
Product:	openSUSE Tumbleweed
UpdateDir:	/linux/suse/x86_64-tw
MemLoadImage:	358400
MemYaST:	123456
InstsysComplain:	2
InitrdID:	2023-09-10.f0446d80
dud:		disk:/?device=*usb*&all=1&quiet=1
autoyast2:	disk:/autoinst.xml?device=*label/OEMDRV&quiet=1
dud:		disk:/?device=*label/OEMDRV&quiet=1
defaultrepo:	cd:/,hd:/,http://download.opensuse.org/tumbleweed/repo/oss/
KexecReboot:    1
PTOptions:	AutoUpgrade,productprofile,addon,XVideo,Screenmode,specialproduct,reboot_timeout,LIBSTORAGE_*,YAST_*,Y2*
Manual: 1
Textmode: 1

# Note: you can put config files also into /etc/linuxrc.d/.

Getting closer :slight_smile:

Since the technique for editing initrd is now ok, maybe my linuxrc configs are incomplete. Will read up on those now.

After a couple of days reading and experimenting I found I was using the wrong approach. I should have been editing the GRUB configs and not initrd.

While I have the new approach sort of working I do have an issue or two with GRUB that I will raise in a new thread now.

Let’s called this thread closed - and thanks for the replies.