| View previous topic :: View next topic |
| Author |
Message |
bjlockie Veteran

Joined: 18 Oct 2002 Posts: 1172 Location: Canada
|
Posted: Tue Jun 12, 2012 12:51 pm Post subject: /dev/sdc1 changes to /dev/sda2 |
|
|
I'm trying to move my install from /sda2 to my ssd drive on /dev/sdc1
I also want to move /var/tmp to ram but that doesn't work.
$ more /etc/fstab
/dev/sda1 /boot ext2 noauto,noatime 0 2
/dev/sda2 /home ext4 defaults,auto,noatime 0 1
/dev/sdc1 / ext4 defaults,auto,noatime,discard 0 1
/dev/sdb1 /media/storage ext4 defaults,auto,noatime 0 2
tmpfs /var/tmp tmpfs size=1G 0 0
tmpfs /tmp tmpfs size=1G 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
$ mount
/dev/sda2 on / type ext4 (rw,noatime,discard,commit=0)
/dev/sdb1 on /storage type ext4 (rw,noatime)
/dev/sdb1 on /media/storage type ext4 (rw,noatime,commit=0)
/dev/sda2 on /home type ext4 (rw,noatime)
tmpfs on /tmp type tmpfs (rw,size=1G)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
/dev/sdb1 on /storage type ext4 (rw,noatime)
$ dmesg | grep sd
Command line: root=/dev/sdc1
Kernel command line: root=/dev/sdc1
sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
sd 1:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb: sdb1
sd 1:0:0:0: [sdb] Attached SCSI disk
sd 4:0:0:0: [sdc] 175836528 512-byte logical blocks: (90.0 GB/83.8 GiB)
sd 4:0:0:0: [sdc] Write Protect is off
sd 4:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdc: sdc1
sd 4:0:0:0: [sdc] Attached SCSI disk
EXT4-fs (sdc1): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (sdc1): couldn't mount as ext2 due to feature incompatibilities
EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (sdc1): re-mounted. Opts: discard
EXT4-fs (sda2): re-mounted. Opts: (null)
EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null) _________________ AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS |
|
| Back to top |
|
 |
Veldrin Veteran


Joined: 27 Jul 2004 Posts: 1931 Location: Zurich, Switzerland
|
Posted: Tue Jun 12, 2012 1:28 pm Post subject: |
|
|
what exactly fails? what is the error message?
and try one step at a time.
both tmp directories need special permission: 1777 or rwxrwxrwt
| Code: | tmpfs /var/tmp tmpfs size=1G,mode=1777 0 0
tmpfs /tmp tmpfs size=1G,mode=1777 0 0 |
you said you wanted to move your root fs. how did you move it?
for such a move, i usually boot into a livecd environment to be sure that the rootfs does not change.
the errors further down come from a missing kernel argument: rootfstype=ext4
V. _________________ read the portage output!
If my answer is too short, just ask for an explanation. |
|
| Back to top |
|
 |
bjlockie Veteran

Joined: 18 Oct 2002 Posts: 1172 Location: Canada
|
Posted: Tue Jun 12, 2012 10:34 pm Post subject: |
|
|
| Veldrin wrote: | what exactly fails? what is the error message?
and try one step at a time.
both tmp directories need special permission: 1777 or rwxrwxrwt
| Code: | tmpfs /var/tmp tmpfs size=1G,mode=1777 0 0
tmpfs /tmp tmpfs size=1G,mode=1777 0 0 |
you said you wanted to move your root fs. how did you move it?
for such a move, i usually boot into a livecd environment to be sure that the rootfs does not change.
the errors further down come from a missing kernel argument: rootfstype=ext4
V. |
I did a cp -ar from my old root to the new one.
It mostly works.
I fixed the /tmp permissions like you said.
I'd like to put /var in ram (at least /var/run).
The biggest thing left is mount thinks my / is /dev/sda2 and it should be /dev/sdc1.
It IS using /dev/sdc1 though, it's weird. _________________ AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS |
|
| Back to top |
|
 |
Veldrin Veteran


Joined: 27 Jul 2004 Posts: 1931 Location: Zurich, Switzerland
|
Posted: Wed Jun 13, 2012 12:57 pm Post subject: |
|
|
| Quote: | | I'd like to put /var in ram (at least /var/run). | putting /var in a tmpfs is next to impossible (ok, squashfs + loop might be a solution), as var contains variable data for various daemons, the entire gentoo system config (what packages are installed.)
/var/run should be automatically put on a ramdisk/tmpfs by openrc - at least i never changed any config, and it always worked.
for you root problem.
could you post you grub config? I am specifically interested in the root= or real_root= argument.
V. _________________ read the portage output!
If my answer is too short, just ask for an explanation. |
|
| Back to top |
|
 |
bjlockie Veteran

Joined: 18 Oct 2002 Posts: 1172 Location: Canada
|
Posted: Wed Jun 13, 2012 11:51 pm Post subject: |
|
|
| Veldrin wrote: | | Quote: | | I'd like to put /var in ram (at least /var/run). | putting /var in a tmpfs is next to impossible (ok, squashfs + loop might be a solution), as var contains variable data for various daemons, the entire gentoo system config (what packages are installed.)
/var/run should be automatically put on a ramdisk/tmpfs by openrc - at least i never changed any config, and it always worked.
for you root problem.
could you post you grub config? I am specifically interested in the root= or real_root= argument.
V. |
title Gentoo Linux
root (hd0,0)
kernel /boot/bzImage root=/dev/sdc1
savedefault
I wonder if it is udev? _________________ AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS |
|
| Back to top |
|
 |
Veldrin Veteran


Joined: 27 Jul 2004 Posts: 1931 Location: Zurich, Switzerland
|
Posted: Thu Jun 14, 2012 8:02 am Post subject: |
|
|
you grub config looks correct, and a fallback entry would only match if there was an error.
I doubt, that it is an udev issue, as the /root gets mounted long before udev is started.
are you sure, you updated the fstab on the ssd? though i doubt that the init-scripts/openrc mount first mount one rootfs then switch to another... _________________ read the portage output!
If my answer is too short, just ask for an explanation. |
|
| Back to top |
|
 |
HeissFuss Guru

Joined: 11 Jan 2005 Posts: 400
|
Posted: Fri Jun 15, 2012 1:01 am Post subject: |
|
|
You should probably use UUIDs in fstab instead of sd device names anyway since those don't change.
You can get them from 'blkid' and the fstab syntax is 'UUID="your filesystem uuid" /mount/point/ ext4 etc' |
|
| Back to top |
|
 |
bjlockie Veteran

Joined: 18 Oct 2002 Posts: 1172 Location: Canada
|
Posted: Sat Jun 16, 2012 3:18 am Post subject: |
|
|
| HeissFuss wrote: | You should probably use UUIDs in fstab instead of sd device names anyway since those don't change.
You can get them from 'blkid' and the fstab syntax is 'UUID="your filesystem uuid" /mount/point/ ext4 etc' |
I changed it to UUIDs but I had to mount /storage and mount /home.
There were no errors and mount thinks it mounted but there were no files in it.
# mount
/dev/sda2 on / type ext4 (rw,noatime,discard,commit=0)
/dev/sdb1 on /storage type ext4 (rw,noatime)
/dev/sdb1 on /media/storage type ext4 (rw,noatime,commit=0)
/dev/sda2 on /home type ext4 (rw,noatime,commit=0)
/dev/sda2 on /var type ext4 (rw,noatime,commit=0)
/dev/sdb1 on /storage type ext4 (rw,noatime)
tmpfs on /tmp type tmpfs (rw,size=4G,mode=1777)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
/dev/sdb1 on /storage type ext4 (rw,noatime,commit=0)
/dev/sda2 on /home type ext4 (rw,noatime,commit=0)
# df
df: '/media/storage': No such file or directory
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 87773488 9901824 73475804 12% /
/dev/sdb1 480647488 275469428 180758860 61% /storage
/dev/sda2 487820492 130588556 332813136 29% /home
/dev/sda2 87773488 9901824 73475804 12% /var
/dev/sdb1 480647488 275469428 180758860 61% /storage
tmpfs 4194304 56 4194248 1% /tmp
shm 8165176 0 8165176 0% /dev/shm
/dev/sdb1 480647488 275469428 180758860 61% /storage
/dev/sda2 487820492 130588556 332813136 29% /home
UUID="a82c245a-5323-4eda-a094-fa2de81721a5" /boot ext2 noauto,noatime 0 2
UUID="743d709c-766c-477a-a892-65808cae645d" /home ext4 defaults,auto,noatime 0 1
UUID="743d709c-766c-477a-a892-65808cae645d" /var ext4 defaults,auto,noatime 0 1
UUID="e2647271-08fb-4af5-9a6f-11283a521bbd" / ext4 defaults,auto,noatime,discard 0 1
UUID="b7c60eb6-5501-4f1e-9c05-a416770cc32f" /storage ext4 defaults,auto,noatime 0 2
# use a ram disk for portage and /tmp
tmpfs /tmp tmpfs size=4G,mode=1777 0 0
/media/storage must be cached somewhere because it is an old mount point. _________________ AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS |
|
| Back to top |
|
 |
bjlockie Veteran

Joined: 18 Oct 2002 Posts: 1172 Location: Canada
|
Posted: Sun Jun 17, 2012 5:37 pm Post subject: |
|
|
$ df
df: '/media/storage': No such file or directory
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 87773488 9382636 73994992 12% /
/dev/sdb1 480647488 236183452 220044836 52% /storage
/dev/sda2 487820492 115553208 347848484 25% /home
/dev/sda2 487820492 115553208 347848484 25% /var
/dev/sdb1 480647488 236183452 220044836 52% /storage
/dev/sda2 487820492 115553208 347848484 25% /other
tmpfs 4194304 1446860 2747444 35% /tmp
shm 8165176 0 8165176 0% /dev/shm
/dev/sdb1 480647488 236183452 220044836 52% /storage
$ cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext4 rw,noatime,discard,data=ordered 0 0
devtmpfs /dev devtmpfs rw,relatime,size=8164956k,nr_inodes=2041239,mode=755 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/sda2 /other ext4 rw,noatime,data=ordered 0 0
tmpfs /tmp tmpfs rw,relatime,size=4194304k 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/sdb1 /storage ext4 rw,noatime,data=ordered 0 0
$ mount
/dev/sda2 on / type ext4 (rw,noatime,discard,commit=0)
/dev/sdb1 on /storage type ext4 (rw,noatime)
/dev/sdb1 on /media/storage type ext4 (rw,noatime,commit=0)
/dev/sda2 on /home type ext4 (rw,noatime,commit=0)
/dev/sda2 on /var type ext4 (rw,noatime,commit=0)
/dev/sdb1 on /storage type ext4 (rw,noatime)
/dev/sda2 on /other type ext4 (rw,noatime,commit=0)
tmpfs on /tmp type tmpfs (rw,size=4G,mode=1777)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
/dev/sdb1 on /storage type ext4 (rw,noatime) _________________ AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|