LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-17-2018, 08:07 PM   #1
Locestar
LQ Newbie
 
Registered: May 2018
Posts: 1

Rep: Reputation: Disabled
Install ext4 on a partition within an extended partition


Hello all,

I am trying to install ext4 on a partition which is inside an extended partition, but this command won't work:
Code:
sudo mkfs.ext4 /dev/sda2/sda8
sudo mkfs.ext4 /dev/sda2/sda8
mke2fs 1.43.5 (04-Aug-2017)
Could not open /dev/sda2/sda8: Not a directory

Where sda2 is the extended partition and sda8 is the partition I want to install ext4 on.

I also tried
Code:
sudo mkfs.ext4 /dev/sda2
But it asked me this:
sudo mkfs.ext4 /dev/sda2
mke2fs 1.43.5 (04-Aug-2017)
Found a dos partition table in /dev/sda2
Proceed anyway? (y,N) N
and I am not sure if this is what I want. Is this going to overwrite all the partitions in sda2?

Here is the output of fdisk -l :
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2099199 2097152 1G 83 Linux
/dev/sda2 2099200 81995775 79896576 38.1G 5 Extended
/dev/sda5 2101248 2306047 204800 100M 83 Linux
/dev/sda6 65224704 81995775 16771072 8G 83 Linux
/dev/sda7 2308096 44251135 41943040 20G 83 Linux
/dev/sda8 44253184 65222655 20969472 10G 83 Linux

I think conceptually this makes sense, but I do not know how to accomplish this.
 
Old 05-18-2018, 08:05 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,483

Rep: Reputation: 2284Reputation: 2284Reputation: 2284Reputation: 2284Reputation: 2284Reputation: 2284Reputation: 2284Reputation: 2284Reputation: 2284Reputation: 2284Reputation: 2284
Sda2 is not directly used in any commands.

mkfs.ext4 /dev/sda8

Verify the correct partition before running commands.
 
1 members found this post helpful.
Old 05-18-2018, 01:25 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,493

Rep: Reputation: 2771Reputation: 2771Reputation: 2771Reputation: 2771Reputation: 2771Reputation: 2771Reputation: 2771Reputation: 2771Reputation: 2771Reputation: 2771Reputation: 2771
Hello and welcome to LQ.

You are confusing how an OS views the partition versus how you are viewing it I think. This is shown in your example of /sda2/sda8.

There are a few GUI's that may help visualize the drive as well as how the OS is viewing it. There are a few command line tools also.

Links like this may help. http://linuxbsdos.com/2014/11/08/a-b...ns-in-linux/2/
 
Old 05-18-2018, 06:32 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,030

Rep: Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572
In your initial post, sda2 shows as an Extended partition which is a primary partition and a container for logical partitions and does not contain data or filesystems so as suggested, create the fs on sda8. The link in the previous post has a pretty detailed explanation.
 
  


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
Possibility to create swap partition if extended partition is out of space? bhavisavla Linux - Newbie 1 09-12-2011 06:39 AM
[SOLVED] ext4 in dos extended partition editheraven Linux - General 1 08-18-2011 08:37 PM
[SOLVED] I need help converting a vfat extended partition into a ext4 partition zorro70 Linux - General 6 02-15-2011 08:55 PM
HowTo convert Primary Partition to Logical (ie move it inside the Extended Partition) Tom6 Linux - Software 3 11-29-2010 03:40 PM
extended sata partition shrunk at 15 partition limit, how to re-enlarge Siljrath Linux - General 3 06-02-2010 10:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration