General TC > Tiny Core on Virtual Machines

Setting up Qemu

<< < (2/7) > >>

Rich:
Hi nick65go

--- Quote from: nick65go on February 20, 2023, 02:42:40 PM --- ... PS: it is just for fun, to remind me the flow: boot-loader -> kernel -> shell (+ libs)  -> udev -> mounts -> login.
--- End quote ---

This appears to be accurate:
https://forum.tinycorelinux.net/index.php/topic,22020.0.html

Rich:
Hi nick65go
If you run this:

--- Code: ---autoscan-devices
--- End code ---
does it find your virtual disk?

nick65go:

--- Quote from: Rich on February 20, 2023, 02:52:45 PM ---
--- Code: ---autoscan-devices
--- End code ---
does it find your virtual disk?

--- End quote ---
Yes, result is "vda"

nick65go:
Wow, I think I found the "wrong" instruction; is in the /etc/init,d/tc-functions, at lines 91 and 106:

--- Code: ---MOUNTPOINT="$(grep -i ^$D2\  /etc/mtab | awk '{print $2}' | head -n 1)"
--- End code ---
I think that is should be $D2, without "\"; or to be $D2\s; [where \s means space in regex].

I can execute code
--- Code: ---D2=/dev/vda ABC="$(grep -i ^$D2 /etc/fstab)" ; echo $ABC
--- End code ---
resulting in ABC="/dev/vda" from /etc/fstab, or resulting ABC="" from /etc/mtab.

But with
--- Code: ---D2=/dev/vda ABC="$(grep -i ^$D2\  /etc/fstab)" ; echo $ABC
--- End code ---
I stay in a loop forever.

Rich:
Hi nick65go

--- Quote from: nick65go on February 20, 2023, 06:06:37 PM --- ... I think that is should be $D2, without "\"; or to be $D2\s; [where \s means space in regex]. ...
--- End quote ---
No, it is correct as written. The "\ " tells grep to include a trailing space
as part of the search term. If you look at:

--- Code: ---^$D2\  /etc
123456789
--- End code ---
there are 2 spaces between  \  and  /  in positions 6 and 7.

The first space is part of the search term and the second
separates search term from the file to be searched.

As near as I can tell,  find_mountpoint  works correctly:

--- Code: ---tc@E310:~$ for DEVICE in `autoscan-devices`; do find_mountpoint $DEVICE; echo $MOUNTPOINT; done
/mnt/sda2
/mnt/sda7
/mnt/sda3
/mnt/sda1
/mnt/sda6
/mnt/sdb1
tc@E310:~$
--- End code ---

Rename your  /tce  directory to  /cde  and add the  cde  boot code.
The  cde  directory must be in the root of the drive.
Remove any  tce  boot codes.
It should be able to find the  /cde  directory on its own.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version