Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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"
"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.
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:
"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"
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:
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.
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
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.
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.
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.-::::-
I have always performed fresh installations and had complete success.-
Quote:
Originally Posted by Ztcoracat
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.