LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   after install how to keep file system safe and use another partion for my file system (https://www.linuxquestions.org/questions/linux-newbie-8/after-install-how-to-keep-file-system-safe-and-use-another-partion-for-my-file-system-4175457221/)

highrolla 04-07-2013 07:21 AM

after install how to keep file system safe and use another partion for my file system
 
i installed wifislax i have made new partion that i want to use for installing apps like google chrome firefox and keep my main root file system safe use it to boot up but after use new partion for adding media and apps i have been reserching for weeks i just cant work it out i have been to my distro forum with no sucksess can someone assist me with my problem pls

would be very gratefull
thanks
my os is

wifislax 4.4 beta 12
kde 4.10.1
Slackware 14.0
3.7.10-wifislax
i686
i have 3 partions:
1)=swap
2)=sda2 ext4 wifislax [installed wifislax here]
3)=sda3 ext4 want this to be my home file system

it was a live cd i installed to hard drive all my setting get saved automaticly no problem there distro was made for only 1 user so ther is no home directory i dont no how to sort this out am a noob to linux so need instructions but i lern fast and i have googled it been been trying for weeks no help at wifislax forum i have been serching high and low

i just fed up with messing up my root file system and haveing to reinstall ther must be a easy solution to this problem?
so if you no pls help a man in need!!

thanks

theNbomr 04-07-2013 11:08 AM

The file /etc/fstab is used to define which partitions get mounted and where their mountpoints are. Commonly, the /home directory is a mountpoint for a partition that is used for user data. Example:
Code:

/dev/sda3      /home  ext3    defaults        0      2
There are a few different ways to identify the partition: by block device name, by label, and by UUID.

Make the accordant adjustments to your fstab, and as root, run
Code:

mount -a
It might not hurt to post (in [CODE] [/CODE] tags) a copy of your existing fstab file and someone will be able to suggest appropriate modifications.
You may have to add user directories, and modify the passwd file to point users' $HOMEs to the appropriate places.

--- rod.

highrolla 04-07-2013 02:16 PM

thanks here is the fstab:=

/dev/sda1 / auto defaults 1 1
# Do not edit this file as fstab is recreated automatically during every boot.
# Please use /etc/rc.d/rc.local or sysvinit scripts if you want to mount/unmount drive,
# filesystem or network share.

# System mounts:
aufs / aufs defaults 0 0 # AutoUpdate
proc /proc proc defaults 0 0 # AutoUpdate
sysfs /sys sysfs defaults 0 0 # AutoUpdate
devtmpfs /dev devtmpfs defaults 0 0 # AutoUpdate
devpts /dev/pts devpts rw,mode=0620,gid=5 0 0 # AutoUpdate

# Device partitions:
/dev/sda2 /mnt/sda2 ext2 auto,noatime,nodiratime,suid,dev,exec,async 0 0 # Autoupdate
/dev/sdb1 /mnt/sdb1 vfat auto,noatime,nodiratime,suid,dev,exec,async,umask=0,check=s,utf8 0 0 # Autoupdate

# Swap partitions:
/dev/sda3 none swap sw,pri=1 0 0


and ther is no home directory in file sysem but ther is a root home so i i problem need to add it but how wifislax was configerd as single user i been told i have tryed adduser and useradd if fails to write a home directory i downloaded kuser it will make new user but wont write home directory no of them worked i was goner add new user as non root but wont work

ok thanks

highrolla 04-07-2013 02:19 PM

here is my rc.local file:=
#!/bin/sh

# Start vboxdrv
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxdrv ]; then
/etc/rc.d/rc.vboxdrv start
fi

# Start vboxballoonctrl-service
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxballoonctrl-service ]; then
/etc/rc.d/rc.vboxballoonctrl-service start
fi

# Start vboxweb-service
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxweb-service ]; then
/etc/rc.d/rc.vboxweb-service start
fi

#start clamav antivirus state
if [ -x /etc/rc.d/rc.clamav ]; then
/etc/rc.d/rc.clamav start
fi

if [ -x /etc/rc.d/rc.amavisd-new ]; then
/etc/rc.d/rc.amavisd-new start
fi

# Start vboxautostart-service
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxautostart-service ]; then
/etc/rc.d/rc.vboxautostart-service start
fi

# Actualizar asociacion de archivos y cache de iconos

if [ -x /usr/bin/cacheupdater ]; then
echo "Updating mimetypes & icon caches..."
cacheupdater &> /dev/null &
fi

if [ -x /etc/rc.d/rc.laptop-mode ]; then
/etc/rc.d/rc.laptop-mode start &> /dev/null &
fi


thanks

spiky0011 04-07-2013 02:33 PM

Hi

Can you post output of
Code:

sudo blkid
FYI
Can you put the output between code tags

highrolla 04-07-2013 02:41 PM

this sudo blkid

/dev/sda1: LABEL="wifislax-install" UUID="25974d11-0795-4b9a-aa3d-23288e584940" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda2: LABEL="home" UUID="b768ba23-93f5-4d1e-af1e-76847169a469" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda3: UUID="f290e777-0283-4c7d-90ec-64d16188bc5e" TYPE="swap"
/dev/sdb1: UUID="B6A8-AB05" TYPE="vfat"
/dev/sdb2: UUID="76e8a482-6686-45da-ae5f-433b55a18b9b" TYPE="swap"


thanks will do next step now

highrolla 04-07-2013 02:44 PM

this is bash version-check.sh
bash, version 4.2.37(2)-release
/bin/sh -> /bin/bash
Binutils: (Linux/GNU Binutils) 2.22.52.0.2.20120424
bison (GNU Bison) 2.5.1
/usr/bin/yacc -> /usr/bin/yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.19
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /bin/gawk-3.1.8
gcc (GCC) 4.7.1
(GNU libc) 2.15
grep (GNU grep) 2.14
gzip 1.5
Linux version 3.7.10-wifislax (root@wifislax) (gcc version 4.7.1 (GCC) ) #1 SMP PREEMPT Mon Mar 25 13:37:42 UTC 2013
m4 (GNU M4) 1.4.16
GNU Make 3.82
GNU patch 2.7
Perl version='5.16.1';
GNU sed version 4.2.1
tar (GNU tar) 1.26
version-check.sh: line 33: makeinfo: command not found
Texinfo:
xz (XZ Utils) 5.0.4
gcc compilation OK

thanks

spiky0011 04-07-2013 02:53 PM

Hi

Ok /dev/sda2 is the partition that is to be used as home
Code:

/dev/sda1: LABEL="wifislax-install" UUID="25974d11-0795-4b9a-aa3d-23288e584940" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda2: LABEL="home" UUID="b768ba23-93f5-4d1e-af1e-76847169a469" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda3: UUID="f290e777-0283-4c7d-90ec-64d16188bc5e" TYPE="swap"

By the way you dont need that script thats for something else

have a look here
http://embraceubuntu.com/2006/01/29/...own-partition/

USE CODE TAGS PLZZ

tHIS IS WHY YOUR USER WONT WORK AS WELL

spiky0011 04-07-2013 03:02 PM

What is the output of
Code:

sudo ls -al /home

highrolla 04-07-2013 03:04 PM

ok thanks for your help so the fstab file what do i have to do paste them 3 lines in in or relpase with them? i am just reading How To Ask Questions The Smart Way lo!! thanks for your help

ps what are code tags?

highrolla 04-07-2013 03:09 PM

sorry here is sudo ls -al /home

ls: cannot access /home: No such file or directory

thanks

spiky0011 04-07-2013 03:13 PM

Ok code tags, if you click on the # sign it will put CODE]your msg[/CODE] on your reply type or paste what ever between them'

Read that link I posted

OK
Code:

ls /
Thats ls small "L"

highrolla 04-07-2013 03:17 PM

here it is ls
ls /
bin/ include/ media/ root/ srv/ var/
boot/ kdeadmin-kuser-4.10.2-1-i686.pkg/ mnt/ run/ sys/
dev/ lib/ opt/ sbin/ tmp/
etc/ lost+found/ proc/ share/ usr/

click were in termial sorry

highrolla 04-07-2013 03:27 PM

yer sorry i did look at that and again ? gosh i havent got a scooby doo

sorry

would like to learn but may be bit advanced for me but i been useing linux bout 6 mounths now i like it a lot i been on it every day but computers are hard if you dont no how

spiky0011 04-07-2013 03:28 PM

not in terminal top of where your posting new reply

Ok back to problem
Code:

sudo mkdir -v /home
Then
Code:

sudo vim /etc/fstab
Code:

/dev/sda1 / auto defaults 1 1
/dev/sda2 /home ext4 defaults 0 0
# Do not edit this file as fstab is recreated automatically during every boot.
# Please use /etc/rc.d/rc.local or sysvinit scripts if you want to mount/unmount drive,
# filesystem or network share.

To save file in vim press ESC then :wq

theNbomr 04-07-2013 03:29 PM

If you have no /home directory, just make one (as root):
Code:

mkdir /home
Change the line in your fstab that mounts on /mnt/sda2 to mount on /home. Reboot, or run 'mount -a'.
The script that creates users may try to create them in /mnt/sda2, but it sounds like probably not. You may find one or more existing user home directories in the partition that you are re-mounting.

We asked you to use [CODE] [/CODE] tags to preserve readability and formatting of your posted data. Please reciprocate to those who are trying to help you by doing so. See the link in my sig for details.

--- rod.

highrolla 04-07-2013 03:32 PM

on sudo vim /etc/fstab

udo: vim: command not found

do you want me get to file in dolphin and edit it

spiky0011 04-07-2013 03:34 PM

Yes as root use sudo

theNbomr 04-07-2013 03:35 PM

Okay, just re-reading your fstab file, it looks like there is no actual installation. Is this a system that boots from a CD/DVD/Flash-drive? If so, then there is no simple way to make your changes permanent. Please give use the details of the nature of this system, and how it was created.

--- rod.

highrolla 04-07-2013 03:43 PM

no all my changes are getting saved after reboot i have no problem ther it was a live cd/usb but has a hdd install menu wich installs to my hdd

chrism01 04-07-2013 07:54 PM

Here's an explanation/howto of code tags https://www.linuxquestions.org/quest...do=bbcode#code

Good Linux tutorial http://rute.2038bug.com/index.html.gz

highrolla 04-08-2013 02:15 AM

Ok thanks how would I install applications on my system now . Rebooted and it home mounts under home thanks for your help most thankfully

And change my paths

highrolla 04-08-2013 02:29 AM

Would home be under /home/
Not /root/home//

To work apps do copy file system over to hone
if so how to set new path

spiky0011 04-08-2013 10:55 AM

Hi

Home would be /home correct

highrolla 04-08-2013 12:12 PM

thanks spiky

highrolla 04-08-2013 02:22 PM

I just want to say thanks to all who have helped me at linux questions i have solved my problems with your help my home now mounts on new partion and all is correct if anyone is reading this post and are looking to do the same here is a good link witch i found helpfull thanks to linux question forum

http://embraceubuntu.com/2006/01/29/...own-partition/


many thanks


All times are GMT -5. The time now is 06:56 AM.