Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 14 Dec 2019, 15:50
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
FirstRib default WeeDog Linux build system
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 7 of 49 [722 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 47, 48, 49 Next
Author Message
rockedge


Joined: 11 Apr 2012
Posts: 1361
Location: Connecticut, United States

PostPosted: Sat 15 Jun 2019, 08:55    Post subject:  

good stuff!
I've been putting FirstRib through the paces on my set up...I am using a base-system with some frills and having good success.

I am following on the new thread and will begin to experiment with building a boot version following your work with developing a initramfs
Back to top
View user's profile Send private message Visit poster's website 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Wed 26 Jun 2019, 22:20    Post subject: HowTo boot FirstRib-based WeeDog Linux build scripts.
Subject description: WeeDog uses frugal install so can share Linux formatted partition
 

NOTE WELL that the latest initramfs02.gz should automatically detect and load most modules (including for wifi and ethernet).

Also (optional), you can force the use of traditional interface name conventions, if you so wish (i.e. the likes of eth0, wlan0) by including (per rockedge's suggestion) the following grub kernel line parameter:


Code:
net.ifnames=0


For example grub4dos menu.lst details, see post:

http://www.murga-linux.com/puppy/viewtopic.php?p=1031626#1031626

======================================================================


MANUALLY CONNECTING TO NETWORK:

Once you have new FirstRib-based WeeDog system booted to commandline you can easily connect to the Internet via ethernet or wifi as follows (of course you can simplify the procedure by using the relevant commands below in a simple script).

ETHERNET connection

Ethernet firmware should be auto-detected on boot.

Find out your ethernet_interface_name with command

Code:
ip link
or for more detail
Code:
ip address


All you need then is for system to get IP address via dhcp using command:

Code:
udhcpc -i <ethernet_interface_name>


Should now be connected. Test with say: ping google.com
-------------------------

WIFI connection

On boot wifi device should be detected automatically. Then simply run the following commands (note well the use of >> for "append to"):

Code:
wpa_passphrase <yourwifiSSID> <passwordKey> >> /etc/wpa_supplicant/wpa_supplicant.conf


(i.e. In the above you need to supply your wifi connection name and password)

Find out your wifi_interface_name with command

Code:
ip link
or for more detail
Code:
ip address


Then use wpa_supplicant to connect:

Code:
wpa_supplicant -i <wifi_interface_name> -c /etc/wpa_supplicant/wpa_supplicant.conf -B


(the -B runs wpa_supplicant in the background).

Finally, you need IP address from dhcp. Get that with command:

Code:
udhcpc -i <wifi_interface_name>


(or whatever your wifi interface name is).

Should now be connected. Test with say: ping google.com
------------------------------

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130

Last edited by wiak on Thu 15 Aug 2019, 04:15; edited 16 times in total
Back to top
View user's profile Send private message 
westwest

Joined: 10 Apr 2015
Posts: 71

PostPosted: Sat 29 Jun 2019, 11:59    Post subject: VLC  

Hello, firstrib built successfully within scpup64...

I've installed VLC, which cannot be run as root. What would be the steps to make this possible in firstrib?

Tried adding user:puppy, but i understand too little about permissions to make this work.
Same after installing sudo with xbps.

Any help appreciated, thank you.
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1361
Location: Connecticut, United States

PostPosted: Sat 29 Jun 2019, 13:30    Post subject:  

@westwest

open a terminal and type ->
Code:
sed -i 's/geteuid/getppid/' /usr/bin/vlc



this only needs to be done once

then start VLC
Back to top
View user's profile Send private message Visit poster's website 
westwest

Joined: 10 Apr 2015
Posts: 71

PostPosted: Sat 29 Jun 2019, 15:08    Post subject: firstrib  

Thanks, VLC now starts. I'm getting a message about missing i965 driver,
but that seems to have no effects on media playback.

Is it possible or advisable to mount more than one shared folder with mount_chroot? And does umount_chroot need to be adjusted accordingly?
Back to top
View user's profile Send private message 
westwest

Joined: 10 Apr 2015
Posts: 71

PostPosted: Sat 29 Jun 2019, 16:00    Post subject: firstrib  

Also, could it be possible in any way to run firstrib32 inside a 64bit distro?
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Sat 29 Jun 2019, 19:01    Post subject:  

westwest wrote:
Is it possible or advisable to mount more than one shared folder with mount_chroot?


Yes, it is fine. For example, I was using the following additions to mount_chroot.sh running firstrib_rootfs in BionicPup64 host system:

Code:
mkdir -p firstrib_rootfs/varpackages
mount --bind /var/packages firstrib_rootfs/varpackages
mkdir -p firstrib_rootfs/oldroot
mount --bind /root firstrib_rootfs/oldroot


westwest wrote:
And does umount_chroot need to be adjusted accordingly?


Yes, after 'exit' from chroot. ./umount_choot.sh, for above extras, should contain:

Code:
umount firstrib_rootfs/varpackages && umount firstrib_rootfs/oldroot


westwest wrote:
Also, could it be possible in any way to run firstrib32 inside a 64bit distro?


Yes, that's not a problem. To test, I build a firstrib_rootfs in BionicPup32 and then re-booted into BionicPup64 and ran that 32bit firstrib_rootfs build as usual with ./mount_chroot.sh.

What wouldn't work, would be to try and run a firstrib64 inside a 32bit host system since the binaries inside firstrib64 need 64bit host kernel.

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4216
Location: holland

PostPosted: Sun 30 Jun 2019, 04:16    Post subject:  

westwest wrote:
Is it possible or advisable to mount more than one shared folder with mount_chroot?


Another shared folder that can be added is /run/udev (to be able to run an X session in chroot), but it needs to be created in the chroot (see below, mkdir ...).
Works for me then running X in chroot, with working keyboard and mouse, found info here:
https://superuser.com/questions/688766/how-to-start-xorg-server-inside-plain-chroot

I have in mount_chroot.sh (in bold what I added):

# bind mount host virtual filesystes required for chroot into firstrib_rootfs to work on host system
mkdir -p firstrib_rootfs/run/udev
mount --bind /proc firstrib_rootfs/proc && mount --bind /sys firstrib_rootfs/sys && mount --bind /dev firstrib_rootfs/dev && mount -t devpts devpts firstrib_rootfs/dev/pts && mount --bind /tmp firstrib_rootfs/tmp && mount --bind /run/udev firstrib_rootfs/run/udev && cp /etc/resolv.conf firstrib_rootfs/etc/resolv.conf

Unmount firstrib_rootfs/run/udev when done or add to umount_chroot.sh:
Code:
umount firstrib_rootfs/run/udev


The easiest to try is with twm window-manager since it's default in etc/X11/xinit/xinitrc
To install (e.g. also to make startx work)
Code:
xbps-install coreutils file mc bash xorg-minimal twm xterm dejavu-fonts-ttf xclock xinit util-linux libEGL

(not sure if libEGL is required, for me it was (xserver error without it)
And run startx to get in twm. (type exit in the "login" terminal to leave the X session)

I expermented with openbox too and it worked (by replacing twm with openbox above) but it needs some editing of etc/X11/xinit//xinitrc in the chroot:
Last lines:
Code:
#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login
exec openbox-session


I'm not sure if this all works on any OS, I tested only on Stretchdog.

When booting with initramfs.gz I tried also and could start X, but keyboard and mouse not working, can't figure out how to solve, maybe it's because /run is empty.

Fred

_________________
Dog Linux website
Tinylinux blog by wiak

Last edited by fredx181 on Sun 30 Jun 2019, 04:28; edited 1 time in total
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Sun 30 Jun 2019, 04:22    Post subject:  

fredx181 wrote:
westwest wrote:
Is it possible or advisable to mount more than one shared folder with mount_chroot?


Another shared folder that can be added is /run/udev, but it needs to be created in the chroot.
Works for me then running X in chroot, with working keyboard and mouse, found info here:
https://superuser.com/questions/688766/how-to-start-xorg-server-inside-plain-chroot


Very good info Fred. Rockedge, in particular, will I'm sure find that very useful. I also see FirstRib run in a chroot on a host Linux system as an attractive add-on to very small core distros like tinycore since having xbps package manager and build utilities is useful for me.

NOTE: you should xbps-install -S ncurses-base
also so that backspace key works correctly with bash.


Getting X working in initramfs.gz included version will no doubt also get solved in time. This week for me though will continue with me finishing off a switch_root initramfs.gz version since that fits bigger rootfs better. As I said, then I also will be playing with trying to get X working and mouse/keyboard etc working.

EDIT: Via that link above that you posted Fred, I also came across Xpra (whichs "started as screen for X"), which also looks interesting (as of course are the discussed elsewhere: Xnest and Xephyr):

https://kb8ojh.net/elb/musings/tag/xpra
http://xpra.org/trac/wiki/About

There are certainly a lot of interesting schemes out there.

EDIT: I can confirm that X worked, as Fred described, with firstrib_rootfs mount_chroot.sh on BionicPup64 host system too.

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130

Last edited by wiak on Sun 30 Jun 2019, 08:23; edited 3 times in total
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Sun 30 Jun 2019, 05:52    Post subject:  

fredx181 wrote:
When booting with initramfs.gz I tried also and could start X, but keyboard and mouse not working, can't figure out how to solve, maybe it's because /run is empty.


EDIT: Come to think of it, you'd really need to do the following using BionicPup (version you are using) if that was the zdrXX.sfs you planned to use with initramfs.gz since won't know what modules needed (or already in BionicPup vmlinuz) otherwise.

Aside from looking at modules loaded on host system with lsmod, it would probably be worth checking out host's udev rules then, since, for keyboard/mouse with X, I'm pretty sure initramfs.gz firstrib version will simply need correct modules loaded (which should load required firmware) for mouse/keyboard to work. I didn't check out udev last night but I was looking at some likely modules my host system loads, such as hid-generic.ko and usbhid.ko (modprobe usbhid, or modprobe hid-generic, would also load hid.ko according to modules.info or "modinfo hid-generic" or "modinfo usbhid" command). After all, I guess that's most of what udev does anyway (and triggers scripts etc). Probably more modules need loaded, depending on system hardware, maybe not... (psmouse.ko on old systems?), but like I say, I have just been reading about it - not as yet trying any of it out.

So, I suggest simply trying:

EDIT: the following no use for BionicPup64 since following modules available there. I suspect for that case, usbhid is already built into the kernel.

Code:
modprobe hid-generic
modprobe usbhid


prior to startx

in the initramfs.gz independently booting FirstRib-based WeeDog.
_________

Though I'm pretty sure manual modprobe the relevant modules will get mouse/keyboard working prior to startng X, if you wish you can find a lot of udev-related info by running following command from a terminal on host Linux system:

Code:
udevadm monitor


whilst, for example, plugging usb mouse (or keyboard) in and out, and then using command:

Code:
udevadm info -a -n <name>


where <name> is what udevadm monitor revealed for mouse or keyboard (a long string) similar to what is decribed in following link:

http://granjow.net/udev-rules.html

EDIT: I tried above both by plugging in and unplugging out both usb mouse and usb keyboard. I noticed the keyboard also needed driver uhci_hcd but 'modinfo uhci_hcd' revealed no such module on my XenialDog64 system, so I guess it is built into the kernel. Otherwise I would have had to modprobe it too (or insmod it and all its dependency modules).

EDIT2: I'm don't really understand why this is, but when using BionicPup32, my wifi firmware gets loaded, but I noted that BionicPup32 disn't include it in /lib/firmware (so I presume built into kernel). However, firstrib WeeDog (i.e. with initramfs.gz) wouldn't load my wifi unless I included /lib/firmware/iwlwifi_firmware_for_my_system. Seems stuff built into kernel (if I'm correct) doesn't get seen after the chroot so has to be modprobed... That would mean modules usbhid.ko and hid-generic.ko and hid.ko modules would need to be available, and manually loaded (which they aren't in zdrv of the BionicPup64 I actually ended up using). As I say, I'm not sure about that but thinking it might be the problem (alas, I don't have these BionicPup64 modules to try).

Fred, how do you startx in initramfs version anyway? Mine just crashes out saying Display can't be found or something, so I guess some extra stuff is needed (graphics/xorg-servers for graphics card type etc?). I looked in /var/log/Xorg.0.log but it's too long since I ever mucked around with X and I can't remember any of it.

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4216
Location: holland

PostPosted: Sun 30 Jun 2019, 12:19    Post subject:  

wiak wrote:
Fred, how do you startx in initramfs version anyway? Mine just crashes out saying Display can't be found or something, so I guess some extra stuff is needed (graphics/xorg-servers for graphics card type etc?). I looked in /var/log/Xorg.0.log but it's too long since I ever mucked around with X and I can't remember any of it.


Yes, for me the same, forgot to mention earlier that xorg-minimal isn't enough for when booting from initramfs.gz. I installed "xorg" and startx worked, but that's bringing a lot of dependencies, probably not all are required.

About the kernel modules loaded, I'm almost sure that the Puppy kernels have more than enough builtin modules to make mouse and keyboard working. Perhaps better search for how /run can get populated (/run is empty after boot, which should not).
I tried installing runit-void and eudev (and reboot), but didn't help.

Fred

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Sun 30 Jun 2019, 16:25    Post subject:  

fredx181 wrote:
About the kernel modules loaded, I'm almost sure that the Puppy kernels have more than enough builtin modules to make mouse and keyboard working. Perhaps better search for how /run can get populated (/run is empty after boot, which should not).


Yes, I was thinking that too. I'm pretty sure X would start if hid-generic.ko, usbhid.ko and hid.ko were made available in firstrib_firmware_modules.sfs and manually loaded after firstrib boot, but that's a recurring issue and shouldn't be necessary since already likely all in Bionic kernel.

So yes, need to find how to get /run populated.

I'll probably finish switch_root version this week - so will work on these details too.

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1361
Location: Connecticut, United States

PostPosted: Sun 30 Jun 2019, 16:47    Post subject:  

I have done the same...I installed Xorg just to get the X server going with the intent of going back later and optimizing.

I also modified etc/X11/xinit//xinitrc to start JWM

#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login
exec jwm
exec rox -p default

I have although been using just JWM and not rox pinboard to see if I could pin down what is missing for the keyboard and mouse. I am going to try to go down the path that wiak discovered and see if the X server will work with input!
Back to top
View user's profile Send private message Visit poster's website 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Sun 30 Jun 2019, 17:50    Post subject:  

I'm probably going to experiment with installing udev (actually, eudev package on Void) though I note that embedded Linux installs often just populate dev manually.

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Sun 30 Jun 2019, 18:27    Post subject:  

fredx181 wrote:

I tried installing runit-void and eudev (and reboot), but didn't help.


Fred, did you make the symlink:

Code:
ln -s /etc/sv/udevd /var/service


EDIT: Actually, runit will need to wait till the switch_root initramfs version is ready since runit needs to run as process number 1, which cannot be arranged when using straight chroot version.

I think that is needed to activate the service for boot. EDIT: I think installing eudev actually creates that symlink automatically in this case.

If that worked (I'm not at that stage yet) I'd probably then have to mount bind /run/udev prior to the chroot line in my initramfs buildscript init.

Code:
mount --bind /run/udev merged/run/udev


But I'm just guessing at this stage. Will have to look into it all further.

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 7 of 49 [722 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 47, 48, 49 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0818s ][ Queries: 13 (0.0129s) ][ GZIP on ]