LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-20-2011, 09:21 AM   #1
StupidNewbie
Member
 
Registered: Dec 2007
Posts: 71

Rep: Reputation: 16
Partitioning Question - virtualbox


Hi everyone,

I am starting to build a new LFS (using 7.0 book) system and am a little confused about creating the partitions/filesystem. I am doing this in VirtualBox on an Ubuntu 11.10 guest with a CentOS6 host.

So I installed Ubuntu and gave it an 8GB piece of my host drive.

Code:
root@lfs-VirtualBox:~# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00017239

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    15728639     7863296   83  Linux
/dev/sda2        15730686    16775167      522241    5  Extended
/dev/sda5        15730688    16775167      522240   82  Linux swap / Solaris
root@lfs-VirtualBox:~#
Then I created the partitions using fdisk as recommended in step 2.2 as follows (6g primary and 256m swap):

Code:
root@lfs-VirtualBox:~# fdisk -l /dev/sda1

Disk /dev/sda1: 8052 MB, 8052015104 bytes
255 heads, 63 sectors/track, 978 cylinders, total 15726592 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x948d5881

     Device Boot      Start         End      Blocks   Id  System
/dev/sda1p1            2048    12584959     6291456   83  Linux
/dev/sda1p2        12584960    13109247      262144   82  Linux swap / Solaris
root@lfs-VirtualBox:~#
After rebooting, now when trying to create the ext3 filesystem on /dev/sda1p1 I get the following:

Code:
root@lfs-VirtualBox:~# mke2fs -jv /dev/sda1p1
mke2fs 1.41.14 (22-Dec-2010)
Could not stat /dev/sda1p1 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
root@lfs-VirtualBox:~#
Am I totally off base here? I'm a little confused as to why I'm creating a new partition and filesystem inside an existing linux partition w/ nothing in it. Is this just to isolate the LFS system from the host system?

Also, in section 2.2.1.3 the book recommends creating convenience partitions such as /boot and /home. Should I also be doing that using fdisk or is that something I'll do after I have successfully created the filesystem?

Thanks for any advice you can give!
 
Old 12-21-2011, 08:54 AM   #2
StupidNewbie
Member
 
Registered: Dec 2007
Posts: 71

Original Poster
Rep: Reputation: 16
Anyone?

...Bueller?
 
Old 12-21-2011, 10:14 AM   #3
singhharmeet
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Rep: Reputation: Disabled
after reboot did you tried fdisk again on your virtual drive ???
 
Old 12-21-2011, 10:34 AM   #4
StupidNewbie
Member
 
Registered: Dec 2007
Posts: 71

Original Poster
Rep: Reputation: 16
Yes, the fdisk shown above listing the 6g linux and 256m swap partitions is actually after rebooting. I just threw that in there to make it clear that I did reboot to allow the kernel to use the new partition table. Thanks for the response! Any ideas on this?
 
Old 12-21-2011, 10:52 AM   #5
singhharmeet
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Rep: Reputation: Disabled
you dont need to create other partitions for directories ... only swap and root will do !

can you please run # fdisk -l and paste the results here ? dont give /dev/sda1

just run fdisk -l and paste your results.
 
Old 12-21-2011, 11:07 AM   #6
singhharmeet
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Rep: Reputation: Disabled
http://forums.gentoo.org/viewtopic-t...3-start-0.html

take a look at this link may be it will help you ...
 
Old 12-21-2011, 01:07 PM   #7
StupidNewbie
Member
 
Registered: Dec 2007
Posts: 71

Original Poster
Rep: Reputation: 16
fdisk -l is pasted right above it in the OP. It shows the 8g virtual partition (dev/sda1) and the 512m swap partition (/dev/sda5)

That is within my ubuntu virtual machine. I will give the stuff in that link a try too - thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] virtualbox in ubuntu 9.10 question unix1adm Linux - General 28 01-18-2010 08:15 AM
XP Embedded/VirtualBox Question jmite General 2 11-23-2009 01:38 PM
virtualbox and kernel question Josh000 Slackware 7 10-15-2009 10:25 AM
VirtualBox question rob33n Debian 14 07-26-2009 07:54 PM
VirtualBox question kebabbert Solaris / OpenSolaris 7 07-16-2008 06:43 AM

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

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