LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Linux From Scratch (https://www.linuxquestions.org/questions/linux-general-1/linux-from-scratch-122294/)

fuelinjection 12-03-2003 10:32 AM

Linux From Scratch
 
someone ealier posted a link to a website that shows you how to install linux from scratch.

In my spare time I'm going to do this in order to gain a little bit of knowledge about how linux works.

I dont want to effect my current install, so I will setup a second HD, but once setup, how do I switch to the other drive? i.e. in dos you would just type 'd:' and this would take you to that drive.

Is it similar in linux, but you enter 'hdb/'?

8nasmith 12-03-2003 11:04 AM

.

SciYro 12-03-2003 11:24 AM

first find were the drive is conected to (look at devices.txt in the linux source itll give every device name number and what is is) then just mount it like and partion (if its hdb then type mount /dev/hdb1 or whatever the # is) also u might have to make the device file for the 2nd hard drive so thatll txt file is a must

fuelinjection 12-03-2003 11:29 AM

I felt that catch my hair as it went straight over my head!

Sorry

chup 12-03-2003 12:17 PM

what sciyro is saying is this:
if its not the first hd, and you have 2 hard disks, its going to be /dev/hdb.
you should make partitions on the hd and format the partitions; you will end up with /dev/hdb1,/dev/hdb2,/dev/hda3 and so on.
then you need to make a mount point (just a normal dir somewhere) and mount your hd to that point.
in example: you have formatted the 1st partition of the 2nd harddisk as reiserfs.
to mount it youll have to create a mount point, lets say we make a dir called hdb1 in your home dir.
then you can mount it using the mount command as root like "mount -t reiserfs /dev/hdb1 /home/*your username*/hdb1".
if you want to access the drive you can then just do "cd /home/*your username*/hdb1".
and btw you should edit your fstab so you wont have to mount it manually each time ;)

minio 12-03-2003 12:20 PM

Look here -> http://www.linuxplanet.com/linuxplan...orials/4232/1/ maybe it will help you. You couuld mount your new HDD under /mnt/lfs as is done in LFS-BOOK

MasterC 12-03-2003 12:45 PM

Re: Linux From Scratch
 
Quote:

Originally posted by fuelinjection
{SNIP}
I will setup a second HD, but once setup, how do I switch to the other drive? {SNIP}

What you are referring to is called chrooting, or simply chroot. During the LFS (Linux From Scratch) book you'll come upon the section that explains in detail how to perform the chroot, but before that point it's important you are working on a partition that you don't have data on (other than the LFS data of course). You will need this partition/device (if it's a second HD it'll be a partition on a device ;) ) to have a filesystem on it, and that too should/will be covered in the LFS manual.

Now, to answer your question, we'll assume your second hard drive is Primary Slave as you have indicated, /dev/hdb, and that you have 1 massive partition on it, so just /dev/hdb1 exists. Now, how does one chroot? Well, first off, you'll need to have the drive mounted (let's assume at /mnt/lfs) and the data from Chapter 5 on it, once that's done you have a filesystem that is populated enough to live in a chrooted environment by:
chroot /mnt/lfs

And [basically] you are done. So the easy answer to your question:
chroot

;)

Cool

trickykid 12-03-2003 06:05 PM

Quote:

Originally posted by 8nasmith
are there any pro moderator out there who can help?

they do know a lot

8nasmith,

Please only post if your going to post constructively to answer others questions on the forums. This is a reason the person posted was to recieve answers, not for other members to post that they need help or answers as well, that's why we have forums like this.

It is in our rules to post a constructive post or just move on to the next one. If your not going to provide actual answers to a question, move on and post in the ones you can actually provide helpful posts in.

Regards.

PS. The way your posting on the forums seems to some members like an attempt to boost up your posts count which truly means nothing. Just a thought.

fuelinjection 12-04-2003 01:48 AM

thanks for all the help guys, I think I've got enough information now to do it.

God I love this site!!! Someones always got the answer


All times are GMT -5. The time now is 03:58 AM.