Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 07:25PM |
Registered: 9 years ago Posts: 1,516 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 07:38PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 07:39PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 07:46PM |
Registered: 9 years ago Posts: 1,516 |
2. Insert the Ext3 rootfs. Check the driver letter dmesg | tail
root@debian:~# dmesg | tail [ 16.635075] udevd[267]: starting version 175 [ 17.008015] input: gpio_keys as /devices/gpio_keys/input/input0 [ 17.464454] orion_wdt: Initial timeout 25 sec [ 19.078763] EXT3-fs (mmcblk0p1): using internal journal [ 19.401288] random: nonblocking pool is initialized [ 21.641282] NET: Registered protocol family 10 [ 24.375198] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 27.198041] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled [ 27.207885] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 34.129823] Adding 1048572k swap on /swapfile1. Priority:-1 extents:979 across:6462620k SSFS root@debian:~#
3. Insert the Ext4 drive. Check the driver letter dmesg | tail
root@debian:~# dmesg | tail [ 604.890117] usbcore: registered new interface driver uas [ 605.875000] scsi 1:0:0:0: Direct-Access Generic Mass-Storage 1.11 PQ: 0 ANSI: 2 [ 606.671181] sd 1:0:0:0: [sda] 31116288 512-byte logical blocks: (15.9 GB/14.8 GiB) [ 606.679531] sd 1:0:0:0: [sda] Write Protect is off [ 606.684674] sd 1:0:0:0: [sda] Mode Sense: 03 00 00 00 [ 606.685410] sd 1:0:0:0: [sda] No Caching mode page found [ 606.690724] sd 1:0:0:0: [sda] Assuming drive cache: write through [ 606.706087] sda: sda1 [ 606.712037] sd 1:0:0:0: [sda] Attached SCSI removable disk [ 606.735029] sd 1:0:0:0: Attached scsi generic sg0 type 0 root@debian:~#
4. If your Debian has automount set up, the drives were already mounted at this point. Check: mount
root@debian:~# mount sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=14436,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=12172k,mode=755) /dev/mmcblk0p1 on / type ext3 (rw,noatime,errors=remount-ro,user_xattr,acl,barrier=1,data=ordered) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=24340k) rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) root@debian:~#
5. Mount the drives, if they were not auto-mounted: mkdir -p /media/sdb1 mount -o noatime /media/sdb1 /dev/sdb1 mkdir -p /media/sdc1 mount -o noatime /media/sdc1 /dev/sdc1 Then, verify they were mounted mount
root@debian:~# mkdir -p /media/sdb1 root@debian:~# mount -o noatime /media/sdb1 /dev/sdb1 mount: mount point /dev/sdb1 does not exist root@debian:~# mkdir -p /media/sdc1 root@debian:~# mount -o noatime /media/sdc1 /dev/sdc1 mount: mount point /dev/sdc1 does not exist root@debian:~# mount sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=14436,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=12172k,mode=755) /dev/mmcblk0p1 on / type ext3 (rw,noatime,errors=remount-ro,user_xattr,acl,barrier=1,data=ordered) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=24340k) rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) root@debian:~#
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 07:56PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:00PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:05PM |
Registered: 9 years ago Posts: 1,516 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:09PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:10PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:12PM |
Registered: 9 years ago Posts: 1,516 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:25PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:26PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:28PM |
Registered: 9 years ago Posts: 1,516 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:37PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:39PM |
Registered: 9 years ago Posts: 1,516 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:40PM |
Admin Registered: 14 years ago Posts: 19,298 |
dmesg | tail
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:43PM |
Registered: 9 years ago Posts: 1,516 |
> dmesg | tail >
root@debian:~# dmesg | tail [ 330.261041] scsi host2: usb-storage 1-1:1.0 [ 331.265037] scsi 2:0:0:0: Direct-Access Generic Mass-Storage 1.11 PQ: 0 ANSI: 2 [ 331.285131] sd 2:0:0:0: Attached scsi generic sg0 type 0 [ 332.023469] sd 2:0:0:0: [sda] 31116288 512-byte logical blocks: (15.9 GB/14.8 GiB) [ 332.031692] sd 2:0:0:0: [sda] Write Protect is off [ 332.036848] sd 2:0:0:0: [sda] Mode Sense: 03 00 00 00 [ 332.037571] sd 2:0:0:0: [sda] No Caching mode page found [ 332.042880] sd 2:0:0:0: [sda] Assuming drive cache: write through [ 332.058750] sda: sda1 [ 332.071099] sd 2:0:0:0: [sda] Attached SCSI removable disk root@debian:~#
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:49PM |
Admin Registered: 14 years ago Posts: 19,298 |
mkdir -p /media/sda1 mount -o noatime /dev/sda1 /media/sda1and check the mount
mount
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:50PM |
Registered: 9 years ago Posts: 1,516 |
> mkdir -p /media/sda1 > mount -o noatime /dev/sda1 /media/sda1 >> and check the mount
> mount >
root@debian:~# mkdir -p /media/sda1 root@debian:~# mount -o noatime /dev/sda1 /media/sda1 root@debian:~# mount sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=14436,mode=7 devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,pe=000) tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=12172k,mode=755) /dev/mmcblk0p1 on / type ext3 (rw,noatime,errors=remount-ro,user_xattr,acler=1,data=ordered) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=24340k) rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) /dev/sda1 on /media/sda1 type ext3 (rw,noatime,errors=continue,user_xattr,rrier=1,data=ordered) root@debian:~#
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:51PM |
Admin Registered: 14 years ago Posts: 19,298 |
Quote
/dev/sda1 on /media/sda1 type ext3 (rw,noatime,errors=continue,user_xattr,rrier=1,data=ordered)
df -h ls -l /media/sda1
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:55PM |
Registered: 9 years ago Posts: 1,516 |
>Quote
/dev/sda1 on /media/sda1 type ext3 (rw,noat
> ime,errors=continue,user_xattr,rrier=1,data=ordere
> d)
> df -h > ls -l /media/sda1 >
root@debian:~# df -h Filesystem Size Used Avail Use% Mounted on rootfs 15G 2.3G 12G 17% / udev 10M 0 10M 0% /dev tmpfs 12M 244K 12M 3% /run /dev/mmcblk0p1 15G 2.3G 12G 17% / tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 24M 0 24M 0% /run/shm /dev/sda1 15G 2.3G 12G 17% /media/sda1 root@debian:~# ls -l /media/sda1 total 1049748 drwxr-xr-x 29 root root 4096 Jan 13 2016 . drwxrwxrwx 5 root users 4096 Jun 23 18:47 .. drwxr-xr-x 4 root root 4096 Jan 12 2016 .cedata -rw-r--r-- 1 root root 30 Jan 12 2016 .ceid drwxrwxrwx 2 root root 4096 Dec 31 1969 .vnc drwxr-xr-x 2 root root 4096 Jun 14 22:40 bin drwxr-xr-x 3 root root 4096 Jan 13 2016 boot drwxr-xr-x 2 root root 4096 Dec 31 1969 dev drwxr-xr-x 75 root root 4096 Dec 31 1969 etc drwxr-xr-x 8 root root 4096 Oct 23 2015 files_to_upload drwxrwxrwx 4 root sambashare 4096 Aug 19 2015 home drwxrwxrwx 2 root root 4096 Feb 25 2015 installation drwxr-xr-x 11 root root 4096 Jun 14 22:38 lib drwx------ 2 root root 16384 Mar 25 2015 lost+found drwxrwxrwx 2 root users 4096 Jan 14 2016 media drwxrwxrwx 4 root root 4096 Sep 10 2015 mnt drwxr-xr-x 2 root root 4096 Feb 24 2012 opt dr-xr-xr-x 2 root root 4096 Dec 31 1969 proc drwx------ 14 root root 4096 Jun 14 23:09 root drwxr-xr-x 2 root root 4096 Dec 31 1969 run drwxr-xr-x 2 root root 4096 Jun 14 22:41 sbin drwxr-xr-x 2 root root 4096 Aug 12 2015 sdb drwxr-xr-x 3 root root 4096 Aug 12 2015 sdb5 drwxr-xr-x 2 root root 4096 Jul 21 2010 selinux drwxrwxrwx 3 root users 4096 Feb 21 2016 share drwxr-xr-x 2 root root 4096 Feb 24 2012 srv -rw------- 1 root root 1073741824 Jan 13 2016 swapfile1 dr-xr-xr-x 2 root root 4096 Dec 31 1969 sys drwxrwxrwt 5 root root 4096 Jun 14 23:17 tmp drwxr-xr-x 10 root root 4096 Feb 24 2012 usr drwxr-xr-x 12 root root 4096 Feb 25 2015 var -rw-r--r-- 1 root root 9537 Jun 14 21:53 webmin-setup.out root@debian:~#
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:56PM |
Admin Registered: 14 years ago Posts: 19,298 |
ls -latr /media/sda1/boot
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 08:59PM |
Registered: 9 years ago Posts: 1,516 |
> ls -latr /media/sda1/boot >
root@debian:~# ls -latr /media/sda1/boot total 30688 -rw-r--r-- 1 root root 10228 Oct 9 2014 kirkwood-pogo_e02.dtb drwxr-xr-x 2 root root 4096 Oct 17 2014 dts -rwxr-xr-x 1 root root 2822168 Oct 22 2014 zImage-3.17.0-kirkwood-tld-1 -rwxr-xr-x 1 root root 2822168 Oct 22 2014 vmlinuz-3.17.0-kirkwood-tld-1 -rw-r--r-- 1 root root 129088 Oct 22 2014 config-3.17.0-kirkwood-tld-1 -rw-r--r-- 1 root root 1991026 Oct 22 2014 System.map-3.17.0-kirkwood-tld-1 -rw-r--r-- 1 root root 6114271 Oct 24 2014 initrd.img-3.17.0-kirkwood-tld-1 -rw-r--r-- 1 root root 2822232 Oct 24 2014 uImage.orig -rw-r--r-- 1 root root 6114335 Oct 24 2014 uInitrd -rw-r--r-- 1 root root 2832460 Feb 23 2015 uImage.Pogo_E02 -rwxrwxrwx 1 1000 1000 2586 Feb 24 2015 uboot.2014.07-tld-1.environment.scr drwxr-xr-x 3 root root 4096 Jan 13 2016 . -rwxr-xr-x 1 root root 2832196 Jan 13 2016 zImage.fdt -rw-r--r-- 1 root root 2832260 Jan 13 2016 uImage drwxr-xr-x 29 root root 4096 Jan 13 2016 .. root@debian:~#
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 09:00PM |
Admin Registered: 14 years ago Posts: 19,298 |
umount /media/sda1 fsck.ext3 -pf /dev/sda1
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 09:01PM |
Registered: 9 years ago Posts: 1,516 |
> umount /media/sda1 > fsck.ext3 -pf /dev/sda1 >
root@debian:~# umount /dev/sda1 root@debian:~# fsck.ext3 -pf /dev/sda1 rootfs: Inodes that were part of a corrupted orphan linked list found. rootfs: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) root@debian:~#
fsck.ext3 -f /dev/sda1
root@debian:~# fsck.ext3 -f /dev/sda1 e2fsck 1.42.5 (29-Jul-2012) Pass 1: Checking inodes, blocks, and sizes Inodes that were part of a corrupted orphan linked list found. Fix<y>?
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 09:05PM |
Admin Registered: 14 years ago Posts: 19,298 |
e2fsck /dev/sda1
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 09:10PM |
Registered: 9 years ago Posts: 1,516 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 09:10PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 09:11PM |
Admin Registered: 14 years ago Posts: 19,298 |
Re: Migrating Debian rootfs from Ext3 to Ext4 file system June 23, 2017 09:12PM |
Registered: 9 years ago Posts: 1,516 |