LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-05-2015, 08:59 PM   #16
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176

Sorry- I went back and re-read your first post.

Is this what your still getting?

Code:
dracut-initqueue[257]: Warning: Could not boot.
dracut-initqueue[257]: Warning: /dev/centos/swap does not exist
         Starting Dracut Emergency Shell...
Warning: /dev/centos/swap does not exist

Generating "/run/initramfs/rdsosreport.txt"
 
Old 08-05-2015, 09:06 PM   #17
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by jefro View Post
"When I exit out of emergency mode by typing "exit" the system boots normally after sometime, with "A start job is running for dev-mapper-centos\x2dswap.device".

Once that is complete, system is booted up fine."

I've still been wondering about this. I almost can't believe it would work like that.

Wonder if looking at dmsetup is a way to proceed also.
Thank you for joining the thread.-

I'm pondering on this:
https://www.centos.org/docs/5/html/5...etup-info.html
 
Old 08-06-2015, 08:23 AM   #18
hamprop
LQ Newbie
 
Registered: Aug 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
Sorry- I went back and re-read your first post.

Is this what your still getting?

Code:
dracut-initqueue[257]: Warning: Could not boot.
dracut-initqueue[257]: Warning: /dev/centos/swap does not exist
         Starting Dracut Emergency Shell...
Warning: /dev/centos/swap does not exist

Generating "/run/initramfs/rdsosreport.txt"
Yup. I've taken a photo of the boot error message:

http://i.imgur.com/nh5V3rc.jpg


Quote:
Originally Posted by jefro View Post
"When I exit out of emergency mode by typing "exit" the system boots normally after sometime, with "A start job is running for dev-mapper-centos\x2dswap.device".

Once that is complete, system is booted up fine."

I've still been wondering about this. I almost can't believe it would work like that.

Wonder if looking at dmsetup is a way to proceed also.
Is the swap partition truly needed, though? As I understand it, it's a space on the drive for the memory to dump recently unused files, and then swap them out when needed again. Pretty much like the pagefile in windows, and if I remember correctly, you can flatout disable that or limit it to a unpractical size, and the computer would run without a problem (well..if you've got enough memory). So with that being said, could that not be the issue here. I.e., the system is notifying me that no swap partition exists, where one should exist - as a warning, to so speak - and that I can continue as normal beyond that point. Regardless, I've taken a photo of the dmsetup info, and it shows the swap file/partition as "SUSPENDED"

http://i.imgur.com/9VyjSl6.jpg

EDIT:
As a reminder, I did follow a few steps in the tutorial I linked. Perhaps that may have something to do with it? In the tutorial I linked (https://www.digitalocean.com/communi...ap-on-centos-7), I was unable to move past the following step:

"Our swap file is now ready to be used as a swap space. We can begin using it by typing:

Code:
sudo swapon /swapfile
At this step, I got the following error, as mentioned before:

Code:
swapon: /swapfile: swapon failed: Invalid argument

Last edited by hamprop; 08-06-2015 at 08:54 AM.
 
Old 08-06-2015, 02:47 PM   #19
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
ASAIK the swap holds the tmp memory pages.
A server can boot w/o a swap partition as long as there is enough RAM.-

If you continue to have this problem you may want to consider using gparted live and create a swap partition.
I can walk you through that if need be.

Did you do all of these steps?
Code:
- mkdir /swapfile
- cd /swapfile
- dd if=/dev/zero of=/swapfile/swap01 bs=1M count=4096
- mkswap /swapfile/swap01
- chmod 0600 /swapfile/swap01
If you did all those steps than it could be a permissions issue:-

I'm not sure why the swap file/partition is in a suspended state and I don't know how to get it out of the suspended state that it's in; sorry.
http://www.linux.com/community/forum...argument/22674

Maybe our Guru; jefro will know.
 
Old 08-06-2015, 04:16 PM   #20
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Ztcoracat finds things that I can never figure out.

These are the thoughts I have however.

Cloning was always a non-useful way to make a new system. It really still has a number of drawbacks. The general statement is you need to make things generic before you move otherwise you will have to fix any specific reference later.

An issue here seems to be that you cloned a raid of some kind. Is that right? (or LVM I mean)


No, most people don't need a swap file/partition just to get it running. Current notion is that it can't hurt to have it.

Be sure you understand file and partition in the use of swap by the way.

Look at it more with dmsetup. https://access.redhat.com/documentat...n/dmsetup.html Keep reading each page and next 10 or so.

Last edited by jefro; 08-06-2015 at 04:21 PM.
 
Old 08-06-2015, 04:30 PM   #21
hamprop
LQ Newbie
 
Registered: Aug 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
ASAIK the swap holds the tmp memory pages.
A server can boot w/o a swap partition as long as there is enough RAM.-

If you continue to have this problem you may want to consider using gparted live and create a swap partition.
I can walk you through that if need be.

Did you do all of these steps?
Code:
- mkdir /swapfile
- cd /swapfile
- dd if=/dev/zero of=/swapfile/swap01 bs=1M count=4096
- mkswap /swapfile/swap01
- chmod 0600 /swapfile/swap01
If you did all those steps than it could be a permissions issue:-

I'm not sure why the swap file/partition is in a suspended state and I don't know how to get it out of the suspended state that it's in; sorry.
http://www.linux.com/community/forum...argument/22674

Maybe our Guru; jefro will know.
Yup, followed the steps above. I will take you up on your offer for making a swapfile using gparted; I figure if all else fails and I get frustrated beyond reason, the gparted method will be a last resort.

Quote:
Originally Posted by jefro View Post
Ztcoracat finds things that I can never figure out.

These are the thoughts I have however.

Cloning was always a non-useful way to make a new system. It really still has a number of drawbacks. The general statement is you need to make things generic before you move otherwise you will have to fix any specific reference later.

An issue here seems to be that you cloned a raid of some kind. Is that right? (or LVM I mean)


No, most people don't need a swap file/partition just to get it running. Current notion is that it can't hurt to have it.

Be sure you understand file and partition in the use of swap by the way.

Look at it more with dmsetup. https://access.redhat.com/documentat...n/dmsetup.html Keep reading each page and next 10 or so.
I guess this is the ugly side to Linux, huh.

No, no RAID. Just one lonely 200GB drive.

Will do. I'll keep looking into a solution, and if all else fails, I'll be relying on Ztcoracat's help in using gparted.

Thanks to all 3 of you for all the effort you've put in thus far.
 
Old 08-06-2015, 05:14 PM   #22
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Your Welcome.

Gparted is a pretty easy partition manager to work with.

-::-If you find that it comes to a last resort I'd be happy to give you the details and help you make a swap partition.-::-
 
1 members found this post helpful.
Old 08-07-2015, 11:14 AM   #23
hamprop
LQ Newbie
 
Registered: Aug 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
Your Welcome.

Gparted is a pretty easy partition manager to work with.

-::-If you find that it comes to a last resort I'd be happy to give you the details and help you make a swap partition.-::-
You're in luck, Ztcoracat...more problems. But this may hint as to why the swap situation from earlier possibly didn't work.

I've installed gparted, and was about to go through the steps of creating a swap partition, but was greeted with this beauty upon firing it up:


http://i.imgur.com/2cts72M.png

EDIT:

Ran a parted -l command, and this is the output:

Code:
sudo parted -l
Error: Can't have a partition outside the disk!
Model: ATA ST3250310AS (scsi)
Disk /dev/sda: 250GB
Sector Size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/centos-home: 85.9GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number Start  End      Size   File system   Flags
1      0.00B  85.9GB   85.9GB     xfs

Model: Linux device-mapper (linear) (dm)
Dis /dev/mapper/centos-root: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags

Number Start  End      Size   File system   Flags
1      0.00B  160GB   160GB     xfs
The HDD capacity is 250GB...If I understand the output, the system is assuming there are three partitions on this disk, one that's 250GB, another that is 85.9GB, and a third that is 160GB? If that is the case, well, the math simply doesn't make any sense, and clearly something is way off.

Last edited by hamprop; 08-07-2015 at 02:33 PM.
 
Old 08-07-2015, 03:32 PM   #24
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
It's the ugly side of clones.

You used dd command to clone it didn't you?

Still a mapper issue. Must be a newish install if it had xfs.


At this point you could have performed a clean install.
 
Old 08-07-2015, 08:26 PM   #25
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
No, your right the math does not make sense.

If 232 GB is unallocated than that would imply that you have a 18 GB file system of some sort.
245 GB = (85.9 allocated to xfs fs and 160 GB to the centos root) would; based on your 250 GB HDD would indicate that there is 5 GB of unallocated space.

This misconfiguration is most likely (I'm suspicious/suspecting) that's why you couldn't create a swap.

Quote:
I've installed gparted, and was about to go through the steps of creating a swap partition
If that is the only operating system on your HDD you can not use gparted while the distribution is mounted.
The only way to manipulate that partition and create a swap partition is to use gparted live.

-::::-Unless you have another os on that HDD that you can use gparted in to manipulate the CentOS partitions.-::::-
 
Old 08-07-2015, 08:29 PM   #26
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by jefro View Post
It's the ugly side of clones.

You used dd command to clone it didn't you?

Still a mapper issue. Must be a newish install if it had xfs.


At this point you could have performed a clean install.

Ugly indeed:-

I have always performed fresh installations and had complete success.-
 
Old 08-08-2015, 03:31 PM   #27
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
It doesn't look like the way thing have gone that the cloning process worked.

-::-Had the cloning process been successful than gparted would reflect what parted -l is showing.-::-

To avoid frustration and more possible errors and boot failure a fresh installation is the best way to go.-
 
Old 08-10-2015, 08:14 AM   #28
hamprop
LQ Newbie
 
Registered: Aug 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
Ugly indeed:-

I have always performed fresh installations and had complete success.-
Quote:
Originally Posted by Ztcoracat View Post
It doesn't look like the way thing have gone that the cloning process worked.

-::-Had the cloning process been successful than gparted would reflect what parted -l is showing.-::-

To avoid frustration and more possible errors and boot failure a fresh installation is the best way to go.-

So what is done in situations where drives need to be cloned as they are? Say, for example, you are working with multiple machines and want to clone them from a single machine? Or you want a physical backup of a drive? Or simply can't be asked to install every package, codec, etc. every time?

Do you guys have any readings in regards to cloning in linux? I'd like to attempt to reclone this drive from the original, and get a handle on that process.
 
Old 08-10-2015, 03:49 PM   #29
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
There might be some articles about cloning in our "Tutorials" section take a look there when you have the time.


https://www.linux.com/learn/tutorial...ith-clonezilla

http://www.tecmint.com/linux-disk-cloning-tools/

https://wiki.archlinux.org/index.php/Disk_cloning

Read here where it says Falls Short so you can be aware of what Clonezilla does. (doesn't have a partition mgr)
http://lifehacker.com/5891933/the-be...-app-for-linux

Hope that helps.
 
Old 08-17-2015, 04:45 PM   #30
hamprop
LQ Newbie
 
Registered: Aug 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
I'm back - stubborn as ever.

So I attempted to clone the disk once more using gparted, and it worked fine.

Code:
sudo dd if=/dev/sda of=/dev/sdc bs=4K conv=sync,noerror
But still the same issue with the swap partition. I realised, as jefro suggested, this is an LVM. (Although I don't know how this was created, given that I'm running a single disk and followed a basic initial install of CentOS on the original hard drive). I then went to look at how exactly the volume was structured/info using the lvs -a command, only to find out the swap partition is inactive/suspended yet again.

Code:
lvs -a
 LV     VG        Attr       Lsize
vert
home  centos   -wi-ao----     80.00g

root  centos   -wi-ao----     149.02g

swap  centos   -wi-s-----     3.37g
Where 's' in the attributes is for suspended.

So now, the logical next step would be looking into trying to activate the swap.

I've already attempted to activate it with the following command. and got the consequent output:

Code:
lvchange -a y centos
device-mapper: resume ioctl on failed: Invalid Argument
Unable to resume centos-swap (253:1)
I've searched around with no luck as to what could be causing the issue. Any advice, help, information, or simply where to go for further reading to look into the problem would be greatly appreciated.
 
  


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
CentOS 7 "Failed to load SELinux policy. Freezing" = no boot butchrappe Linux - General 4 05-20-2015 07:50 PM
Centos Server Failed @ Bootup: Missing "/sbin/blkid" & "fsck" command not found beagle7 Linux - Newbie 4 08-24-2012 01:33 AM
"Difference between centos and slackware" and "also how to install scratch on centos" vijayendra.uppalapati Slackware 4 07-12-2012 11:10 PM
"Difference between centos and slackware" and "also how to install scratch on centos" vijayendra.uppalapati Slackware 2 01-23-2011 03:14 AM
Debian Boot Up Problem - stuck at "BR" & "I" jc70417 Debian 2 08-30-2005 04:36 PM

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

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