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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I want to try out different puplets on my hard-drive without having to mess around with setting and preferences for the same packages each time. Also it would be handy to avoid having to use my backup dvd's to put my data back onto the machine after each install.
Does puppy have a /home folder or something that i could put on a separate partition?
I have never used puppy but i would assume that it has fdisk or cfdisk to create an new partition to be /home, again assuming that you have free space on your hard drive to mess around without having to resize an current partition. Although to note use at your own risk, i would recommend doing some homework before rushing into it.
/dev/sda5 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda6 on /home type ext3 (rw)
/dev/sda7 on /usr type ext3 (rw)
/dev/sda8 on /var type ext3 (rw)
/dev/sda9 on /tmp type ext3 (rw)
/dev/sda1 on /mnt/winxp type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sdd2 on /media/Linux_Archive type ext3 (rw,nosuid,nodev,uhelper=hal,data=ordered)
If you want to move your '/home' to another device or another partition on the existing device then you will need to prepare the partition or create it. You would first create the partition using 'fdisk' or 'cfdisk'. After you create the partition then you will need to prepare the partition for the filesystem. The mkfs is a front end for creating/formatting/preparing a partition for a filesystem. Type of filesystem can be a personal choice.
Once you have a partition to accept your new/old filesystem data then it's just a matter of copying or moving the files to that partition. Then you must edit your '/etc/fstab' to mount your new partition to the '/' of your current filesystem. As you wish to mount your new 'home' on '/home' then look at;
/dev/sda6 /home ext3 defaults 1 2
as a sample. This technique is used all the time during system regeneration or expansion.
Once you modify the /etc/fstab to include your new /home partition, the filesystem you have created will be mounted over the top of the existing /home (this is not something to worry too much about, but you need to do a little forward planning)
First, backup /home:
tar xvf /home.tar /home
Second, create a temporary mount point for your new partition and mount it:
mount /dev/sda4 /home2
Third, copy the files from /home to /home2:
cp -pR /home/* /home2
Forth, change the /etc/fstab as per your question.
Fifth, unmount/remount /dev/sda4:
When happy, unmount /home and remove the contents from the sub-mounted folder.
Puppy doesn't use /home (and logs you in as root)
The home area for the root account is /root in this instance.
It doesn't even provide a friendly way of creating new accounts (no /usr/sbin/useradd; no /usr/sbin/groupadd) .... I manually edited the /etc/passwd and /etc/shadow files to create an account, but you can't run the passwd command to change the password, there is no mkpasswd to create an encrypted passwd.
Now don't get me wrong, I like Puppy. It's just that I use it as a "Live Distro", the old rule of thumb "Don't leave yourself logged in as root" is just too ingrained for me to use Puppy as my main distro.
Last edited by Disillusionist; 05-26-2009 at 05:14 PM.
If you keep your old /home directory just as it is, and you mount any other device on top of it (like mount -t ext3 /dev/sda6 /home), then the mounted device will be available at your /home. Your old /home contents remain intact, but are hidden and not accessible as long as the other device is mounted on top of it. Of course make sure that the mounted device really has proper user home directories, otherwise only your root account will work properly.
Thanks both of you there. I don't have anything i want to save in /home at the moment. On sda1 i have the usual 15 folders /boot /mnt /etc /dev and all that but no /home whereas on sda4 i only have a /home (and a "Lost&Found", which is the wastebin i think?). sda1 and sda4 are both ext2
Regarding user accounts, lol, typical - i think i'm going to have to stick with puppy on this machine tho. It's only got 256Mb Ram and even Puppy is quite slow. I've had a look at TinyCore, Dsl and AntiX on this machine but Puppy seemed to be the best one for some odd reason
Anyway, if my first paragraph helps you help me further then great
Thanks and regards from
Before you can mount a filesystem there needs to be a directory for it to be mounted on. If there is no /home directory, then you need to make one before you mount the filesystem there.
Puppy is not based on another distribution, but is custom built to only contain the components that it needs. This makes for a very small/efficient operating system, but does mean that you are restricted to what the designers considered to be required.
As I stated in my previous post, Puppy logs you on with the root account with root's home directory being /root.
Assuming you have already created the filesystem (and the /etc/fstab entry for /home)
Now you could copy the contents of /root to /home/root and modify the /etc/passwd entry to use the new home:
if [ ! -d /home ]
if [ ! -d /home/root ]
cp -pR /root/* /home/root/.
ln -s /usr/share/icewm /home/root/icewm
ln -s /home/root/my-applications/bin /home/root/bin
Ooo, i'm not sure about moving the /root i'm quite happy that staying where it is. Really i was now just wondering what to do to fstab to make it pickup on the empty /home that i have put on sda4 which is an ext2 primary partition. Does this look about right?
Is the "defaults 1 2" something to do with permissions? I think i will worry about creating a non-root user later. It's not my main machine, just an old one i'm trying to get working for a friends sister. Hopefully she just wants emailing and web-surfing because that's kinda what she's saying. I've never tried setting up a separate /home before although Wolvix and Ubuntu seem to make it a lot easier than this worry about fstab. It's about time i got to grips with fstab tho.