LinuxQuestions.org
Visit Jeremy's Blog.
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 10-24-2005, 07:52 PM   #1
johnnyoi
LQ Newbie
 
Registered: Oct 2005
Posts: 4

Rep: Reputation: 0
Need help with a couple of things


Hi all, first of all i'm running Red Hat 7.0 and using bash.

I was wondering if anyone could help me do the following:

I need to create a new volume(partition) and transfer 3 home directories from my current partition to the new one.

Secondly, I need to make a second boot partition, identical to my current.

And finally, I need to make an entry in my boot loader to boot into single user mode(runlevel1).


If anyone can help me with anything i mentionned here, I would gladly appreciate it.

Thanks,

John
 
Old 10-24-2005, 08:37 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Re: Need help with a couple of things

Quote:
Originally posted by johnnyoi
Hi all, first of all i'm running Red Hat 7.0 and using bash.
Wow, that's old school
Quote:

I was wondering if anyone could help me do the following:
It would be easier if you had an updated distro. This may be easier for you to perform these tasks under something like Knoppix (A LiveCD Distro) because it will give you both an updated kernel and set of tools, and it will allow your drive to be unmounted to perform these operations
Quote:
I need to create a new volume(partition) and transfer 3 home directories from my current partition to the new one.
Look into a tool called parted, or qparted for gui folks. Then once the partition(s) is(are) created, you simply copy the info:
cp -a /home/whoever /mnt/newpartition
Quote:

Secondly, I need to make a second boot partition, identical to my current.
The same applies here. Once you create the new boot partition using parted and creating a filesystem on them using something like mke2fs -j /dev/hda3 then you mount the drive mount /dev/hda3 /mnt/hda3 And:
cp -a /boot/* /mnt/hda3
Quote:
And finally, I need to make an entry in my boot loader to boot into single user mode(runlevel1).
This, I actually don't know for sure how to do. But I believe that if you pass a 1 to your boot loader when your bootloader is loading the kernel image, single mode is entered. So, if this is true (which I'm not entirely sure as I don't do it and haven't done it) then it would be something like this for lilo (if Lilo is your boot loader):
copy the entry for your current kernel into a new image file, we'll assume it looks like this:

image=/boot/kernel-2.6.12
root=/dev/hda3
label=Linux
read-only

And your new one would be:
image=/boot/kernel-2.6.12
root=/dev/hda3
label=Linux Single
append="1"
read-only

And remember to re-run lilo after the change takes effect. If your boot loader is grub, check your options section and add a 1, similar to what we have done here with lilo.
Quote:
If anyone can help me with anything i mentionned here, I would gladly appreciate it.

Thanks,

John
Hopefully that helps, if not, post back with more information and we can provide more/better info specific to your problem.

Cool
 
Old 10-24-2005, 08:45 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
If you have unused space on your hard drive, you can create a new partition there using cfdisk (command line) or QTparted (gui). Then format the partition with mkfs (see the man pages for more info).

If you don't have unused hard disk space, then you will have to resize an existing partition. Do yourself a favor and make a backup of that partition before resizing. If you need to restore, you can boot from installation cd and restore the backup to the resized partition.

Once you have a new partition, just move the directories to the new partition.

A second identical boot partition? I don't think it's possible, unless the name is different.

To boot into single user mode, you need to edit /etc/inittab. Look for these lines:
# the default runlevel is defined here
id:5:initdefault:

change id:5:initdefault: to id:1:initdefault:

When you reboot, you will boot into single user mode.
 
Old 10-25-2005, 01:14 PM   #4
johnnyoi
LQ Newbie
 
Registered: Oct 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for your help!

But i just need to clarify this:

I'm running linux on a virtual machine (through VMware) and only hav 4.5 GB of room. I only have room for 3 partitions : / /boot and /swap. If i want to add a new partition, what should i do?

also, is it possible to load a kernel on an alternate boot partition? If so, how?

thanks again,

john

Last edited by johnnyoi; 10-25-2005 at 02:16 PM.
 
  


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
Need some advice on a couple of things Geocritter Slackware 3 07-07-2005 06:52 AM
A couple of things needing help with,,, longwolf Linux - Software 7 11-01-2004 08:06 AM
Help on a couple of things.. longwolf Red Hat 1 10-30-2004 03:22 PM
couple things darklordzim Linux - Newbie 1 06-27-2004 11:47 PM
Need help with a couple things hollywood63 Red Hat 2 12-27-2003 08:48 AM

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

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