(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 15 Jan 2021, 22:21
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Linux Source -- Search Path -- Environmental Variables
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Fri 03 Apr 2015, 23:40    Post subject:  Linux Source -- Search Path -- Environmental Variables  

Is there an environmental variable in Linux that says where to search for the kernel source? Per my previous thread, I'm following the instructions here:
http://my-techno-arena.blogspot.ca/2014/07/installing-latest-virtualbox-4312-in.html
to install fatdog64 on a virtual machine. I've made the following changes so far to the procedure.
-- I chose a windows 8.1 instead as the host for the virtual machine because that is the operating system that I'm running under.
-- I've copied the kernel source from the sfs mount using:
Code:

cp -a --remove-destination ./* /mnt/home/src

because I think any changes that I make have to go under mnt/home for the multisession savefile to work....which means I booted up under multi-session.

I chose to load devx rather than mount and copy because I think this is better for memory use. I ran out of memory a few times trying things a different way, so if anyone is following this then save the kernel sfs, and source sfs to a jump drive as backup to avoid haing to re-download them if you mess up.

What I'm trying to do now is "insert guest additions" this allows me to create a shared folder between the linux virtual machine and windows. The command I'm running is:
Code:

sh VBoxLinuxAdditions.run --target /mnt/home

again, I added the --target option because I think it has to be saved under /mnt/home for the multisession save to work. It is the log file of this script that is telling me that it can't find the kernal source even though I know it is under /mnt/home/src/
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Sat 04 Apr 2015, 00:57    Post subject:  

So looking further at the log file I'm suppose to set the variable "KERN_DIR" to the location of the source:

Code:

export KERN_DIR=/aufs/pup_multi/usr/src/linux-3.18.6
sh VBoxLinuxAdditions.run --target /aufs/pup_multi/


the log file tells me that KERN_DIR doesn't point to a directory.

I also noted tat in the source sfs file there was a usr and a lib part. I wonder if KERN_DIR needs the path to both? Currently, I'm only giving it the path to /usr/src...
Back to top
View user's profile Send private message Visit poster's website 
Peterm321

Joined: 29 Jan 2009
Posts: 411
Location: UK

PostPosted: Sat 04 Apr 2015, 02:54    Post subject:  

Firstly I'm wondering if the questions posed are ideal for a beginners forum?

When I have recompiled a kernel, which I should add seems rather different from what I think you are trying to do with virtualbox, the DEVX and Kernel sources have to be loaded at absolute locations otherwise there would need to be a fair bit of tweaking. This is because things like the gcc compiler, GNU Make and so on have to be somewhere in the PATH to be found and run on a Puppy system. Now it could be that there are only certain header files that virtualbox needs and these are already present in the DEVX archive or maybe there are certain elements of it that need to be extracted in the kernel sources archive as well?

It does seem that the source code of the kernel itself and its modules are not needed so if they are not needed its a question of finding what is needed for a manual copy from the DEVX / kernel archives to the system. There is information on this if you use a search engine for KERN_dir and virtualbox. This information may tend to be geared to other distros, however. The virtualbox forums is another source of information and the question is whether the headers discussed there are already within a typical Puppy DEVX archive.

http://mandrivausers.org/index.php?/topic/52824-virtualbox-kern-dir-error/

http://superuser.com/questions/499059/unable-to-install-virtualbox-specify-kern-dir-directory-installing-vir

A post for example to the fatdog forum or the compiling forum may be more suitable places to find out about these kinds of problems.

NB by typing in a terminal window

Code:
ls -aR  /aufs/pup_multi/usr/src/linux-3.18.6 


(or using a file manager or ROX to navigate to it) should at least give you an idea that this folder exists and has files in it including header files e.g. that end with .h
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3475
Location: The Blue Marble

PostPosted: Sat 04 Apr 2015, 14:33    Post subject:  

Peterm321 is right, this is probably not for the beginner's forum.

It is easier to do it on the host, not on the guest. See here: http://www.lightofdawn.org/wiki/wiki.cgi/MakingVBoxGuestAdditionForFatdog.

_________________
Fatdog64 forum links: Latest version | Contributed packages | ISO builder
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Sun 05 Apr 2015, 01:43    Post subject:  

Peterm321 wrote:

Code:
ls -aR  /aufs/pup_multi/usr/src/linux-3.18.6 



I tried it and the directory exists. I think something weird happens when I try to export the variable and then proceed to run the script VBoxLinuxAdditions.run (located on the cd drive).

Anyway, I was able to find the script giving me the error. It was:

/usr/src/vboxguest-4.3.26/vboxguest/Makefile.include.header line 105

I figured this out by running "make --trace" in
/usr/src/vboxguest-4.3.26/vboxguest/

I'm not sure why these files are located here when I specified /mnt/home as the target when running VBoxLinuxAdditions.run

both the makefiles in:
/usr/src/vboxguest-4.3.26/vboxguest/
and
/usr/src/vboxguest-4.3.26/

seemed to work when I went into the directory exported the source location and then ran the makefile.

However, the problem still persists when called indirectly from VBoxLinuxAdditions.run

Going to try restarting and see if anything took effect and work. I think I might need to change the target on make install, for the changes to save. I'm sure I'm missing install tools that would be helpful that are built into fatdog, but one step at a time.
Back to top
View user's profile Send private message Visit poster's website 
jamesbond

Joined: 26 Feb 2007
Posts: 3475
Location: The Blue Marble

PostPosted: Sun 05 Apr 2015, 11:55    Post subject:  

s243a, there are a few pre-conceptions here. Let me try to straighten it out.

Firstly, you don't have to deal with /aufs/pup_multi. In most cases you never need to deal with /aufs/* folders unless you know what you are doing (or trying to do some advanced stuff). The behaviour of Fatdog64 in multisession mode is almost identical with when you use it with savefile/savefolder. All files, anywhere from root (/) downwards (except those in external partitions) will be saved in the session file. Try it - create a file in /root and then save it, and reboot - you will get it back.

When you want to use SFS in multisession mode, you should put the SFS file in "/" and then load them using load_sfs. If you accept the suggestion that they be loaded at boot, the will be loaded at boot. This works because files created in "/" is also saved to the session-file, including the SFS files too. (You can actually put it elsewhere too but this practice of putting SFS files in "/" for multisession mode is consistent with standard Puppies).

Secondly, ignore /mnt/home in multisession mode (and /aufs/pup_multi). I kind of regret now that I created that link, I should not have as it seems to create more confusion than help. The only reason for me to create that link is so that legacy scripts can detect that Fatdog is not running in a live-CD mode; the proper source of information is /etc/BOOTSTATE but many Puppy scripts simply check the presence of /mnt/home link. Please note that everything that you put in /mnt/home *directly* will *NOT* be saved in the session at all. /aufs/pup_multi (and /mnt/home) holds an active copy of the session, an amalgamation of all the session SFS files, but itself is not saved back.

Thirdly, you don't need to unsquashfs the kernel-source SFS and copy them over. Doing this will require more memory than if you use kernel-source.sfs as is.

So the conclusion, if you want to compile the guest addition in multisession-mode while Fatdog is running inside VBox, this is how you do it:
a) bring over devx and kernel SFS into the guest Fatdog, putting both of them in "/"
b) load_sfs.sh both of them
c) insert the guest addition CD
d) mount the disk from within guest Fatdog
e) run "sh /mnt/sr0/VBoxLinuxAdditions.run", and adjust some paths, if you like, as explained in my previous article (or you can do it later). No need to specify --target etc - just install it like normal.
f) reboot to save the session (or press the "session-save" button).

And the session file will contain the installed guest additions, with the extra SFS.
You can extract this session savefile, edit out the files you don't need (devx and kernel sfs), adjust paths if necessary, and then re-pack the rest for later usage.

Oh, and as suggested by Semme on the other thread - don't use 700rc, use the 700 final.

Hope that helps.

_________________
Fatdog64 forum links: Latest version | Contributed packages | ISO builder
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Sun 12 Apr 2015, 00:37    Post subject:  

jamesbond wrote:
s243a, there are a few pre-conceptions here. Let me try to straighten it out.

Firstly, you don't have to deal with /aufs/pup_multi. In most cases you never need to deal with /aufs/* folders unless you know what you are doing (or trying to do some advanced stuff). The behaviour of Fatdog64 in multisession mode is almost identical with when you use it with savefile/savefolder. All files, anywhere from root (/) downwards (except those in external partitions) will be saved in the session file. Try it - create a file in /root and then save it, and reboot - you will get it back.

I think I was trying this because I was having trouble saving via multi-session when fatdog is run within windows as the guest. I'm not sure if this is generally a problem or due to the fact that you have to unmount the host CD drive in order for the image of the "guest services" to load as a virtual CD drive.

I had remember reading that the save directory was /mnt/home so this seemed like a place that I could save and it worked when loading puppy natively (i.e .not in a virtual machine). pwd led me to /aufs/

While this meandering about trough the fatdog file system seemed like a dead end it actually helped me succeed in getting guest services to work. read on.
Quote:

When you want to use SFS in multisession mode, you should put the SFS file in "/" and then load them using load_sfs. If you accept the suggestion that they be loaded at boot, the will be loaded at boot. This works because files created in "/" is also saved to the session-file, including the SFS files too. (You can actually put it elsewhere too but this practice of putting SFS files in "/" for multisession mode is consistent with standard Puppies).


good advice. I did this and it worked Smile
Quote:

Secondly, ignore /mnt/home in multisession mode (and /aufs/pup_multi). I kind of regret now that I created that link, I should not have as it seems to create more confusion than help. The only reason for me to create that link is so that legacy scripts can detect that Fatdog is not running in a live-CD mode; the proper source of information is /etc/BOOTSTATE but many Puppy scripts simply check the presence of /mnt/home link. Please note that everything that you put in /mnt/home *directly* will *NOT* be saved in the session at all. /aufs/pup_multi (and /mnt/home) holds an active copy of the session, an amalgamation of all the session SFS files, but itself is not saved back.

Reading this now, it looks like you gave me a good hint. I skimmed over this and happened to guess correctly. PS I'm glad that /aufs/pup_multi is there, as I don't like details hidden. I want to understand how things work.
Quote:

Thirdly, you don't need to unsquashfs the kernel-source SFS and copy them over. Doing this will require more memory than if you use kernel-source.sfs as is.

Did this and it worked. Good advise. Smile

Quote:
So the conclusion, if you want to compile the guest addition in multisession-mode while Fatdog is running inside VBox, this is how you do it:
a) bring over devx and kernel SFS into the guest Fatdog, putting both of them in "/"
b) load_sfs.sh both of them
c) insert the guest addition CD
d) mount the disk from within guest Fatdog

For anyone following along step c&d are done by pressing the right cntrl key at the same time as the home key, going to the devices menu and selecting "Insert guest image cd..." You'll have to force the mount and you may need to unmounts the host CD drive first.
Quote:

e) run "sh /mnt/sr0/VBoxLinuxAdditions.run", and adjust some paths, if you like, as explained in my previous article (or you can do it later). No need to specify --target etc - just install it like normal.

I did this and it worked Smile
Quote:

f) reboot to save the session (or press the "session-save" button).

Multi-save wasn't working for me with windows as the host. So what I did was first to mount a usb drive. To do this:
1. press cntrl(right cntrl key)-home
2. go to devices/(usb devices)/(and select the correct usb device)

Then I copied the files from /aufs/pup_save/ to the usb drive.

I then closed the virtual machine. Booted the cd up in multi-mode as a stand-alone operating system. Copied the files from the usb drive to "/" keeping the same relative folder path, and shutdown to save the session. I then rebooted the virtual machine up with this CD as multi-mode, and followed the following instructions to open the shared folder:
http://www.ehow.com/how_5450539_set-folder-linux-virtual-machine.html

Quote:
And the session file will contain the installed guest additions, with the extra SFS.
You can extract this session savefile, edit out the files you don't need (devx and kernel sfs), adjust paths if necessary, and then re-pack the rest for later usage.


I need to do this for sure. I created an iso of my dvd and it is 4.483 GB. I'm uploading it anyway to dropbox so others can use it if they wish, but I'll try to trim some fat and remaster it and hope that it comes out much smaller.

Quote:
Oh, and as suggested by Semme on the other thread - don't use 700rc, use the 700 final.

Hope that helps.

I did this so that I'm working with the latest Very Happy

Edit FInal notes:
I created the iso of the cd by following
http://linux-puppy.blogspot.ca/2012/03/puppymakeisoimagecopycddvd.html

I actually did this on precice but the same procedure would work within fatdog.

The actual command I typed was
Code:

dd if=/dev/sr1 of=/fatdog64-700-vbox-on-win8.1

I then realized I forgot the extension so I changed the extension to "iso" after the fact. Not sure if this causes any problems. Regards, I'm uploading the iso to dropbox now to share. I'll try to work on a trimmed down version later.

As a finally, note it might be good to have some kind of start-up script so that the shared folder is automatically mounted on start-up.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
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.5112s ][ Queries: 11 (0.4223s) ][ GZIP on ]