LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-15-2010, 10:02 PM   #1
wow
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Rep: Reputation: 0
Question Partition help


I use dev/sda1 with ext 3

I have plenty of space left.

I use 9.04 jaunty
kernel linux 2.6.28.17 generic
gnome 2.26.1

I do not know linux syntax very well and am trying to follow LFS 6.3 directions but encounter errors im not trained to identify. I want an isolated partition.

I want to make a new partition (without killing my ubuntu) with fdisk: What do I type in the terminal to make a new partition (lets say around 5GB large).

i'm probably not able to identify which steps are missing so keep it simple.

I open a terminal: what next?

*Since ubuntu has its own swap partition do I not need to make one?

things ive failed with in terminal:
fdisk
fdisk dev/sda1
fdisk dev/sda1 n
sudo fdisk dev/sda1 n (this one gives me an error reading "here DISK is something like /dev/hdb and Partition is something like dev/hda7
-u:give start end in sector
-b 2048") (something like that: I cant copy paste since its on another machine)

I also tried
sudo fdisk /dev/sda2 n (Hoping the new number would make the non existant drive) but it did not work.

What do I type to make my partition? Thanks
 
Old 02-16-2010, 02:35 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
First of all, make sure you have backed up any important data from your Ubuntu install, since partitioning is inherently risky.

Before you proceed to partitioning, you need to know what partitions already exist. The command 'fdisk -l' will show you this. If the entire disk has already been allocated to the existing partitions (no matter how empty they are), then it is a bit trickier than just repartitioning.

The function of fdisk is to write a partition table. However, it will not resize the file systems that are contained within the partitions. So if you just overwrite the existing partition table, you will make all the current partitions unusable (and probably lose all your data).

Resizing partitions is the function of programs like parted and gparted. However, these need to be run from a live CD; you will not be able to do this while you are running Ubuntu. You may be able to use the Ubuntu install disk to do this (it has gparted available).

If you understand all that and still want to run fdisk:

The fdisk program is typically used interactively; for example started by:
Code:
fdisk /dev/sda
You then type in fdisk commands as detailed for example in the LFS wikibook. These set up the new partition table (though it is not written until the 'w' command is given).

You can fdisk a drive that is currently in use; the partition table does not take effect until the next reboot. However, it would be more usual to run it from a live CD or another hard drive (which makes it easier to check).

You only require a single swap partition for multiple Linux installs (since only one is running at a time).

Last edited by neonsignal; 02-16-2010 at 02:40 AM.
 
Old 02-16-2010, 08:49 AM   #3
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by wow View Post
I use dev/sda1 with ext 3

I have plenty of space left.

I use 9.04 jaunty
kernel linux 2.6.28.17 generic
gnome 2.26.1

I do not know linux syntax very well and am trying to follow LFS 6.3 directions but encounter errors im not trained to identify. ...
Hi,

if you are new to Linux I wouldn't advise you to attempt LFS at this stage. First you should familiarize yourself with some basics of Linux. Be very careful with the partitioning issue. As neonsignal already pointed out you will most probably lose data if you do not know what you are doing. So try to understand what partitions are and how to partition your hdd before you continue.

If this is your first LFS build then use the LFS liveCD to build it. You will probably not succeed with Ubuntu as build environment because the requirements are not being met. This is a very common issue. Since you are new to Linux you probably won't be able to resolve this issues. And even if you are they will slow you down. When you encounter an error during your LFS build - and you will - then you will have to determine wether there was a mistake on your side or if it is an issue with your host system.

Sorry, if I sound discouraging but I also ran into a lot of trouble to build my LFS from Ubuntu. So actually I am trying to spare you that trouble.

Have fun!
 
Old 02-16-2010, 01:01 PM   #4
wow
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks guys that's helpful, but I'm confused.

I know making a new partition could damage existing files.

But why would using LFS on ubuntu be more difficult if i'm trying to build something from scratch?

Aren't I making a separate (empty) space so I don't have to worry about breaking anything? Why would ubuntu matter other than being a tunnel to send data into the empty space.

As for the live CD, Is the general purpose to do most of the work in the ram without writing to disk? Does that mean I would need to leave the computer running LFS continually until I finish? (I feel like this is going to be a very slow process the first time through)

I am reading up on things as I go but disambiguation from veteran always helps. thanks
 
Old 02-16-2010, 01:42 PM   #5
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by wow View Post
Thanks guys that's helpful, but I'm confused.

I know making a new partition could damage existing files.

But why would using LFS on ubuntu be more difficult if i'm trying to build something from scratch?

Aren't I making a separate (empty) space so I don't have to worry about breaking anything? Why would ubuntu matter other than being a tunnel to send data into the empty space.
If you follow the steps described in the LFS-book you probably will not break anything on your Ubuntu system. The problem is that in order to build your toolchain you will have to use the hostsystem's progams. Some of this programs might not be suited because the installed program version on your host differs from the required program version to build the toolchain.

Look here:
http://www.linuxfromscratch.org/lfs/.../hostreqs.html

There is also the issue that some (or most?) distributors alter the source before distributing it. This issue is also mentioned in the LFS-book.

The LFS liveCD was specifically designed to build LFS.

Quote:
As for the live CD, Is the general purpose to do most of the work in the ram without writing to disk? Does that mean I would need to leave the computer running LFS continually until I finish?
The liveCD just functions as a host system. When you create a partition on your harddrive and write to this data will not be lost after you shut down the PC.

You do not have to build the LFS in one pass. You can do it in several work sessions. However, after a reboot there are some things that you need to consider before you can continue building your LFS. Especially in chapter 6 when you chroot. Follow the books instructions on that. The book describes everything you need to build your LFS.
DO NOT DEVIATE FROM THE BOOK.
Follow each step from start to end exactly as described in the book.

Quote:
(I feel like this is going to be a very slow process the first time through)
No, it will definitly not slow you down. Dealing with incompatibilities on your Ubuntu will. Since aou are new to Linux you will most probably not be able to resolve this issues. So whenever you think your progress is slow with the liveCD just remember that on most other hostsystems you would be standing still or maybe even going backwards.
 
  


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
openSolaris hosed the partition table. Why? Changing primary to secondary partition? JZL240I-U Solaris / OpenSolaris 9 10-16-2008 10:48 AM
tricky backup of Linux system to NTFS partition to increase partition size Pandarsson Linux - General 5 07-09-2008 02:35 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM

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

All times are GMT -5. The time now is 11:37 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