LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   MEPIS (https://www.linuxquestions.org/questions/mepis-64/)
-   -   how do I edit my kernel command line? (https://www.linuxquestions.org/questions/mepis-64/how-do-i-edit-my-kernel-command-line-620047/)

newbiesforever 02-09-2008 11:58 PM

how do I edit my kernel command line?
 
The MEPIS suspend-to-disk says I need to add a "resume=" line to my kernel command line, or something to that effect, to use suspend. How do I get to the kernel command line?

Drakeo 02-10-2008 12:12 AM

that is part of your apends =resumes in you boot up in lilo or grub. this way when it wakes up it knows witch drive to resume to. the hard drive starts back up reads the the etc lilo file I use lilo so hey if you want to know about grub then read the manuals and resumes good luck. if it is lilo you boot manager it is in /etc/lilo.conf

Micro420 02-10-2008 03:42 PM

Are you using LILO or GRUB? That's where you would edit the kernel command line.

newbiesforever 02-10-2008 03:55 PM

I'm using GRUB. I haven't yet tried a distro that installs with LiLo.

syg00 02-10-2008 04:54 PM

Haven't use Mepis in years, but it should be /boot/grub/menu.lst

newbiesforever 02-10-2008 05:21 PM

And would I type "resume=[name of partition]" there? I assume so.

jailbait 02-10-2008 07:06 PM

Quote:

Originally Posted by newbiesforever (Post 3052852)
And would I type "resume=[name of partition]" there? I assume so.

Yes, resume=/dev/hda1 or something similar.

------------------
Steve Stites

newbiesforever 02-10-2008 08:34 PM

Okay. I hope there's no reason an extended partition can't be the resume partition, because that's what I used. An extended partition formatted to be a swap partition.

archtoad6 02-11-2008 04:27 PM

Quote:

Originally Posted by newbiesforever (Post 3052852)
And would I type "resume=[name of partition]" there? I assume so.

If you mean add a separate line
Code:

resume=[name of partition]
to /boot/grub/menu.lst then no.

What you need to do is add the "phrase"
resume=[name of partition] to the appropriate kernel ... line in the file /boot/grub/menu.lst:
Code:

# before
title MEPIS at hda2, kernel 2.4
kernel (hd0,2)/boot/vmlinuz-2.4.29 root=/dev/hda2 ... vga=791 hdb=ide-scsi
initrd (hd0,2)/boot/initrd.splash

# after
title MEPIS at hda2, kernel 2.4
kernel (hd0,2)/boot/vmlinuz-2.4.29 root=/dev/hda2 ... vga=791 hdb=ide-scsi resume=/dev/hdb3
initrd (hd0,2)/boot/initrd.splash

Note: I am guessing that the "resume partition" might be the swap partition, so I have made it /dev/hdb3 in my example. I don't know if that is correct, I am only trying to clarify editing /boot/grub/menu.lst.

newbiesforever 02-12-2008 12:14 PM

Okay. I haven't tried it with your changes yet, but before the changes, the title (entry?) of the Linux partition I usually boot is:

title MEPIS at sda2, newest kernel
root (hd0,1)
kernel /boot/vmlinuz root=/dev/sda2 nomce quiet splash vga=normal
boot

[There are two other entries for this same partition: a "previous kernel" entry and one that specifies kernel 2.6.22-1-mepis-smp, whatever "smp" means. But I have no reason that I know of to do anything with those.]

With the changes, it now says:
title MEPIS at sda2, newest kernel
root (hd0,1)
kernel /boot/vmlinuz root=/dev/sda2 nomce quiet splash vga=normal resume=/dev/sda6
boot

So have I got it right?

pixellany 02-12-2008 12:23 PM

Quote:

Originally Posted by newbiesforever (Post 3052964)
Okay. I hope there's no reason an extended partition can't be the resume partition, because that's what I used. An extended partition formatted to be a swap partition.

An extended partition cannot be used for anything---it is really just part of a "linked list" showing the OS where to find the logical partitions.

I suspect that the only reason that it is given a size is to help partitioning utilities know how to allocate space for logical partitions.

Hmmm, I wonder what happens if you write to an extended partition using dd??? (I don't currently have any machines on which I can try this.)

newbiesforever 02-12-2008 12:44 PM

Well, I just restarted with the menu.1st file thusly modified, and the suspend worked. I can now put the computer to sleep from the Linux partition whenever I want. :D The video was distorted for just a second or two when the GUI started, and then the session locked and made me unlock it, but I can live with that.

Quote:

Originally Posted by pixellany (Post 3054698)
An extended partition cannot be used for anything---it is really just part of a "linked list" showing the OS where to find the logical partitions.

I suspect that the only reason that it is given a size is to help partitioning utilities know how to allocate space for logical partitions.

Hmmm, I wonder what happens if you write to an extended partition using dd??? (I don't currently have any machines on which I can try this.)

Okay, I guess I actually meant using a logical partition for suspending to disk. And I don't know what dd is, Pixellany, but if dd has anything to do with suspending to a logical partition linked to an extended partition as I just did, it must work.

newbiesforever 02-12-2008 12:51 PM

And should I put this in the Success Stories forum? I could, but I'm not sure there is a point. I'd just be repeating in one post the solution which you most learned people :D have given me in several posts.


All times are GMT -5. The time now is 08:34 PM.