LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 02-20-2003, 05:41 PM   #1
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Rep: Reputation: 45
Doing linux from scratch on vmware


Well, the subject say's it all, don't it. To say it explicitly, can I do a linux from scratch project on a vmware virtual pc? Is it possible? And so yes, how should I proceed.
I don't have to much ram on my (real) computer, about 160 MB. I reserved 96 MB for vmware, that was the recomondated amount. I tried booting vmware with knoppix, and although I was able to boot, It didn't start kde because of the limmited ram. I did manage to boot tomsrtbt on floppy distro.
It would help I could acces the host's OS file system. But I don't know how to do that. According to the manual, the host and the guest can share files via an virtual network. The guest OS sees a ethernet card which is actually a virual device made by vmware. I have zero experiance with networking. So I would apreciate if any one who has experiance with vmware and networking would help me out.
I hope im not being vague. To sum it up;

- To do a LFS project, I need an alraidy up and running linux instalation.
- I plan to use an mini linux distro for that job, somthing like tomsrtbt or knoppix.
- That mini linux distro must use files stored on my "real" file system.
- For that I need to establisch network connection between the guest and the host OS

And that last bit is the problem, cos I don't know how to do that.
And as to the question why I want to do this; just for the experiance. I don't have a spare partiton on my real system, so I figured this is the next best thing.
 
Old 02-20-2003, 06:36 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Nice idea

I think it will be a bit easier than it is made out to be. I believe you could just mount the win drive (assuming it's fat32) and then use the files from it. You would boot up with knoppix or tom's and then fdisk -l to find the partition, make a directory (or mount to an existing one) and then go from there. The fallback being that you will lose your existing setup when you reboot vmware. So, you would need to do the LFS book in 1 full swoop, without shutting down. No biggie, just 1 slight setback.

As for how...

Boot into your boot distro (tom's or knoppix) and create a directory for your lfs to go (this would actually be on your vmware filesystem). From there it's just following the book.

Good Luck, it's going to be a bit of work, but I think it'll be a very good learning experience, and be fun as well

If you do end up needing to establish a network connection, boot up to your boot distro (on vmware) and then run ifconfig and show us what shows up. Also, can you access the network (internet) from your boot distro via vmware?

Cool
 
Old 02-20-2003, 06:41 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
I believe you could just mount the win drive (assuming it's fat32) and then use the files from it.
Hi Master,

I'm afraid you're wrong ... the virtual PC that runs
your Linux will only see its *own virtual hard-drive*,
no physical access to the physical host drive.

Cheers,
Tink
 
Old 02-20-2003, 07:08 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Really.... So it's kind of like cygwin see's HD's. Wow, so I guess for now, we would want to know whether or not he can access the 'net with a stock setup?

Thanks for the info

Cool
 
Old 02-21-2003, 03:12 AM   #5
atko
Member
 
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136

Rep: Reputation: 15
The only way you can access other partitions using VMware is if you set it up to use a physical drive instead of a virtual drive. It does work as well but it takes a bit of work to do it.
 
Old 02-21-2003, 04:41 AM   #6
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Original Poster
Rep: Reputation: 45
Hello,

Thanks for your reactions you guy's.

atko, I don't think that's true. You can reach the physical drive via a network connection. The guest OS will think the host OS is on a computer on the network. It says so in the manual. A friend of mine also has vmware and that's the way he acceses his physical drive.
Any way, Im at school right now so can can't give you the output of "ifconfig", but it detected a (virtual) ethernet card "eth0". The IP adress was asignd to it via dhcp and it began with 192 . So That's no good. I don't have internet connection in the virtual pc, but I do on my real one.
How do you establisch a connection between two pc's running linux? I mean in general.
Once I can get to the file system on my physical drive, I should be straigt forward (relativally speaking) to install LFS.
 
Old 02-21-2003, 05:09 AM   #7
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
In vmware you are able to access the disk directly. At least in the 3.2 workstation version this is possible. You have to add a raw disk to the virtual machine. Read the docs at http://www.vmware.com/support/ws3/do...3.html#1008918

The only thing is that the os itself needs to be able to read the partition type. So you can't let a version of windows read your native linux partitions since windows doesn't get very far with that unless you use a third party tool.
Also I'm not sure if this raw access works as a normal user. It might be possible to get it working after allowing extra access rights but I haven't really looked into that.
 
Old 02-21-2003, 05:11 AM   #8
atko
Member
 
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136

Rep: Reputation: 15
Apologies schatoor, I was only going off the vmware wizard. I stand corrected, unfortunately i do not have the manual but thanks for the info.
 
Old 02-21-2003, 05:14 AM   #9
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
And for the network setup could you maybe describe your network setup and how each computer is connected to the internet and which ip's they use.

I've got a internal network using 192.168.x.x addresses. My router NAT's everything from there to the internet. So all I had to do in the virtual machine was pick another 192.168.x.x address in my range and I was online. I did that with windows 98 running in a virtual machine but it shouldn't be any different for another OS.
 
Old 02-21-2003, 05:28 AM   #10
atko
Member
 
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136

Rep: Reputation: 15
Mik you are correct. The user needs to have read/write access to that partition. When setting up you need to ensure that particular partition is not mounted by linux. Then setup will locate it. I use VMware 3.2 at work but the raw drive did not install properly - I kept getting missing NLDR or something like that. Eventually I did setup a virtual drive as opposed to the raw drive and I run in using the network. All seems to be okay as fortunately everything I need is saved to and run off the server anyway. I am running W2K within VMware using RH8 incidentally as linux recognises the windows file system in VMware. May be different the otherway round though, I've never tried it to be honest.
 
Old 02-21-2003, 08:53 AM   #11
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Moved: More suitable in the LFS forum. Lets try to place threads in the most logical forum. Everything doesn't go in Linux - General, only if you have no idea where it should go it should be placed there. Thanks.
 
Old 02-22-2003, 12:29 PM   #12
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Original Poster
Rep: Reputation: 45
Hi, guy's

Sorry for the delay in my responce.
I don't get it. If I read correctly, A rawdisk is an unused partition on my physical HD. But I don't have an spare partition and I don't feel like creatig one.

Here is my "ifconfig" on my HOST os:

eth0 Link encap:Ethernet HWaddr 00:80:C6:07:B7:66
inet addr:62.45.21.64 Bcast:62.45.23.255 Mask:255.255.252.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:808 errors:0 dropped:0 overruns:0 frame:0
TX packets:879 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:557454 (544.3 KiB) TX bytes:105949 (103.4 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:94 errors:0 dropped:0 overruns:0 frame:0
TX packets:94 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5318 (5.1 KiB) TX bytes:5318 (5.1 KiB)

vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
inet addr:192.168.241.1 Bcast:192.168.241.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08
inet addr:172.16.193.1 Bcast:172.16.193.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

On one of the virtual HD's I also installed windows XP. So within the virtual mchine I started IE and went to "ftp://192.168.241.1" and voila, I was in "/home/ftp" of my physical HD. So that's a step in the right direction. But I can't get to the rest of my FS.
VMWare say's it installls samba so you can share files with the host OS. But I know nothing about samba.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debug Linux kernel in vmware (two machines in vmware)?? cyu021 Programming 0 03-30-2005 07:46 PM
Linux from Scratch dev0id Linux From Scratch 7 03-13-2004 06:26 PM
Linux From Scratch fuelinjection Linux - General 8 12-04-2003 01:48 AM
ali aladdin v agp stinks :scratch: :scratch: :scratch: Mr Marmmalade Linux - Hardware 1 07-08-2003 05:11 AM
Linux From Scratch astablemaverick Linux From Scratch 1 08-03-2002 02:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 01:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration