You are not logged in.

#1 2012-06-02 16:43:26

Kitkin15
Member
Registered: 2012-05-18
Posts: 76

Moving backed up filesystems to another hdd

I was going to encrypt my HDD with LUKS and run Arch on it, i was having some problems that i dont currently have time for (Im Military and i have training for 2 weeks starting next Friday) And i need my computer running. So what i did before i installed LUKS was i booted up BT5 and backed up sda1(boot) sda3(root) and sda4(home)

I just formatted my HDD, but the same filesystems on (sda1 is ext2, sda3 and sda4 are ext3) and everything is the same size.

Now when i boot up Arch it boots successfully, i get to the screen to log in, now if i type in "root" and i press enter, it acts as if i didnt type anything at all. I will try to take a picture of this and post it up in just one moment.
PICTURE

I named all my current drives "sda1, sda3, sda4" and i have made those changes in grub and also in fstab. It boots correctly, it just doesnt seem to know where my password and usernames are.

Have i done something wrong?

Last edited by Kitkin15 (2012-06-02 16:59:11)


~Kitkin15
I hate systemd. <3 initscripts <3

Offline

#2 2012-06-02 19:01:20

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Moving backed up filesystems to another hdd

(none) login:

It should say "your_hostname login:"

So I'm thinking you don't have a proper /etc/rc.conf. Here's mine:

LOCALE="en_US.UTF-8"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Bucharest"
USECOLOR="yes"
HOSTNAME="arch"

MODULES=(vboxdrv)

DAEMONS=(syslog-ng dbus ufw crond alsa networkmanager)

And speaking of which, don't forget about /etc/hosts, because:

Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2012-06-02 21:40:49

Kitkin15
Member
Registered: 2012-05-18
Posts: 76

Re: Moving backed up filesystems to another hdd

Both of those are correct, i think it might be other files. But im not sure which ones lol


~Kitkin15
I hate systemd. <3 initscripts <3

Offline

#4 2012-06-03 07:22:23

Kitkin15
Member
Registered: 2012-05-18
Posts: 76

Re: Moving backed up filesystems to another hdd

https://bbs.archlinux.org/viewtopic.php?id=107220

I dug this up, but it seems to be somewhat of a different issue. Mine was working fine after the last time i updated, i think i just have some files with the wrong directory on it.

My fstab used to say:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
uuid=%uuid% swap swap defaults 0 0
uuid=%uuid% /boot ext2 defaults 0 1
uuid=%uuid% / ext4 defaults 0 1
uuid=%uuid% /home ext4 defaults 0 1

%uuid% would be the actual uuid of the filesystem i had. But because i formatted my hdd, the uuid of the filesystem changed (So it wouldnt boot up at all)

So i then changed my fstab to:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
label=sda2 swap swap defaults 0 0
label=sda1 /boot ext2 defaults 0 1
label=sda3 / ext4 defaults 0 1
label=sda4 /home ext4 defaults 0 1

And it now boots up perfectly..... Until it should be poping up SLim, instead it goes into tty and fails like the above picture shows.

Just incase they are needed:

mtab:

rootfs / rootfs rw,relatime 0 0
/dev/sdb1 /initrd/mnt/dev_save vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,quiet,errors=remount-ro 0 0
/dev/loop1 /initrd/pup_ro1 ext2 rw,noatime,errors=continue 0 0
tmpfs /initrd/pup_rw tmpfs rw,relatime,size=1948004k 0 0
tmpfs /initrd/mnt/tmpfs tmpfs rw,relatime,size=132296k 0 0
/dev/loop0 /initrd/pup_ro2 squashfs ro,noatime 0 0
unionfs / aufs rw,relatime,si=fce7d687 0 0
none /proc proc rw,relatime 0 0
none /dev/pts devpts rw,relatime,gid=2,mode=620 0 0
none /sys sysfs rw,relatime 0 0
shmfs /dev/shm tmpfs rw,relatime,size=837340k 0 0
none /proc/bus/usb usbfs rw,relatime 0 0
/dev/sda3 /mnt/sda3 ext3 rw,relatime,errors=continue,data=ordered 0 0

grub:

# (0) Arch Linux
title  T3H M0TH3RB0RD
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-label/sda3 ro
initrd /initramfs-linux.img

Used to say "/dev/disk/by-uuid/%uuid%" but i changed that as well


~Kitkin15
I hate systemd. <3 initscripts <3

Offline

#5 2012-06-03 08:56:27

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Moving backed up filesystems to another hdd

Ok, forget SLiM. Edit your /etc/inittab to look like this (back it up first):

id:3:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

3 tty's are enough for me because I don't like coping a feel for F7 in the dark (black keyboard here).

This will get you into runlevel 3. You can probably also do this from the GRUB menu. Press "e" and type "3" at the kernel line (similar to this) so that it looks like this:

# (0) Arch Linux
title  T3H M0TH3RB0RD
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-label/sda3 ro 3
initrd /initramfs-linux.img

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#6 2012-06-03 16:35:46

Kitkin15
Member
Registered: 2012-05-18
Posts: 76

Re: Moving backed up filesystems to another hdd

inittab looks like this:

#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)	Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

## Only one of the following two lines can be uncommented!
# Boot to console
id:3:initdefault:
# Boot to X11
#id:5:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux

# Serial Virtual Console for KVM and others VMs
#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux

# Hypervisor Virtual Console for Xen and KVM
#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# Example lines for starting a login manager
x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >/dev/null 2>&1

# End of file

I didnt have to edit it, it looks just like what you said (Though there are a few lines in between it, they dont look like they would mess anything up though)

And i also booted up with

kernel /vmlinuz-linux root=/dev/disk/by-label/sda3 ro 3

And nothing changed (And yes i did press "b" on kernel /vmlinuz-linux root=/dev/disk/by-label/sda3 ro 3 lol)

Moving from one tty to another didnt do anything, the only difference on the screen was that it would show tty2 instead of tty1 lol.


~Kitkin15
I hate systemd. <3 initscripts <3

Offline

#7 2012-06-03 16:38:10

Kitkin15
Member
Registered: 2012-05-18
Posts: 76

Re: Moving backed up filesystems to another hdd

Also,

I have made a personal commitment not to reply to people who post topics that start with a lowercase letter. Why? Because FUCK YOU, that's why! If you're too busy to hold Shift, then I'm too busy to help you in any way, shape or form.

I completely agree with that.


~Kitkin15
I hate systemd. <3 initscripts <3

Offline

#8 2012-06-03 22:25:57

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Moving backed up filesystems to another hdd

Your fstab entries look a bit dodgy.

In the examples from the fstab wiki, "/" is mounted after tmpfs, with priority "1" and then the rest follows. Try being more formal. For example, use UUID= instead of uuid=. Linux is more uptight about these things.

Here's mine:

# <file system>                              <dir>           <type>  <options>                            <dump>  <pass>

tmpfs                                        /tmp            tmpfs   nodev,nosuid,noexec                     0       0

UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff    /               ext4    defaults,noatime                        0       1
UUID=f838b24e-3a66-4d02-86f4-a2e73e454336    /media/Storage  ext4    defaults,noatime,nodev,nosuid,noexec    0       2
UUID=14d50a6c-e083-42f2-b9c4-bc8bae38d274    /media/Backup   ext4    defaults,noatime,nodev,nosuid,noexec    0       2

Maybe also comment out the odd line from /etc/inittab:

# Example lines for starting a login manager
x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon

Edit: Yeah, don't use label=sda3 (unless you actually labeled them "sda3", "sda1", etc -- in which case you should use LABEL=sda3, LABEL=sda1, etc). Check the wiki examples. They use /dev/sda3, etc.


LE:

i booted up BT5 and backed up sda1(boot) sda3(root) and sda4(home)

How did you back them up, exactly? Because it could be a permissions problem.

Last edited by DSpider (2012-06-03 22:54:08)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

Board footer

Powered by FluxBB