LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-23-2014, 09:29 AM   #16
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,135

Rep: Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349

Quote:
Originally Posted by project722 View Post
rknichols - Is that expected behavior or a bug perhaps? Would it have failed if not for the sudo? And what about the options specified?
It's expected behavior. As with all of its commands, fdisk is looking at just the first character, "s". The rest of the line is ignored. Without the "sudo", the first character would have been the "m" of "mkfs", and fdisk would have printed its menu.
 
Old 08-23-2014, 09:33 AM   #17
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
Code:
Command (m for help): mkfs -t ext4 /dev/sda3
You should have runned commands like this in bash.. Not in fdisk.. This is way everything went crazy..

Last edited by Smokey_justme; 08-23-2014 at 09:34 AM.
 
Old 08-23-2014, 09:46 AM   #18
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,135

Rep: Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349
Quote:
Originally Posted by project722 View Post
Ok here is where I am at now:
Device Boot Start End Blocks Id System
/dev/sda1 2048 32505855 16251904 83 Linux
/dev/sda2 32507902 33552383 522241 5 Extended
/dev/sda5 32509950 33552383 521217 82 Linux swap / Solaris


That is as close as I could get the structure to the way it was BEFORE I did anything. Below is the way it was originally:

/dev/sda1 * 2048 32505855 16251904 83 Linux
/dev/sda2 32507902 33552383 522241 5 Extended
/dev/sda5 32507904 33552383 522240 82 Linux swap /

As you can see - sda5/swap here in the original exist in the same space(almost) as sda2. I don't really get that but what I had to do to get it to look like this again was actually create sd5 as a logical partition in order to list it as partition "5" then I attempted to convert it to swap space by using "mkswap /dev/sda5". But this failed with "device or resource busy". So I checked to see if it was mounted and it was not. At that point I was not sure what could be keeping me from converting the space into swap so I simply went back into fdisk and changed the ID to 0x82 to identify it as swap. So as of now I have a similar look to the original table.
An extended partition is a container for holding logical partitions (partition numbers 5 and higher). It is normal (required, actually) that the logical partitions are within it.

The reason sda5 appears busy is because the kernel is using what used to be sda5 for swap. Until you reboot, the kernel's notion of sda5 will be at its old starting location.

Your only problem now is that the swap partition doesn't start at the same place it did before. That isn't a fatal problem. It just means that the automatic swapon when you reboot will fail because there is no swap signature present on the new sda5. After you reboot, you will need to run "mkswap -U e0de16fa-8e60-4237-af98-3ebaafb594e5 /dev/sda5" to label the new swap space with the same UUID it had before. Then you can run "swapon -av" to activate that swap space.

Do not forget to reinstall your boot loader. You won't be able to reboot until you do.
 
Old 08-25-2014, 04:35 AM   #19
project722
Member
 
Registered: Jun 2009
Posts: 53

Original Poster
Rep: Reputation: 0
bump - anyone have any suggestions on how I can re-install the boot loader?
 
Old 08-25-2014, 08:54 AM   #20
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
sudo apt-get install grub-pc
 
  


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
altered partition table, Grub2 will not load, how-to chroot? kyrand0047 Linux - General 11 02-25-2011 05:57 PM
ext3 filesystem repair: partition table munched. mrspiffy Linux - Newbie 2 10-23-2008 02:29 AM
Modify partition table without unmounting filesystem s1k Linux - Software 3 05-08-2008 11:35 AM
Problem in creating filesystem for newly created partition. appas Linux - Software 2 08-21-2004 04:39 AM
Slack 10: S-ATA = "No partition table or unknown signature on partition table"? dissolved soul Slackware - Installation 11 08-05-2004 03:12 PM


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