Upgrade from RAID-enabled squeeze to stretch

Discuss development on Bubba
pompopom
Posts: 50
Joined: 13 Dec 2012, 16:45

Upgrade from RAID-enabled squeeze to stretch

Post by pompopom » 21 Mar 2018, 16:12

As with all my projects something came in between this:
https://forum.excito.com/viewtopic.php? ... 942#p27940
and today :-)
So I finally took the leap forward, or at least I tried:
Got an 8GB flash drive
Formatted as fat32
Copied the zip to the flash drive
Unzipped
Plugged in the flash drive and booted with the power button pushed.
Led turns green (+/-30secs)
Then turns red
Then blinks 3 times (very light green(?))
Then purple
red again, blinks, purple etc... (Might be mistaking with the position of the purple phase)

Code: Select all

2013-01-01 11:47:22.904 - INFO - Running Excito installer version 2.0 daemon process with pid 110
2013-01-01 11:47:22.906 - INFO - Checking image file /mnt/usb/install/stretch/b3-stretch-1.0-20170703-2130.txz
2013-01-01 11:47:22.914 - INFO - Checking /dev/sdb
2013-01-01 11:47:22.915 - INFO - Running 'fdisk -l /dev/sdb'
2013-01-01 11:47:22.938 - ERROR - [fdisk] Partition 1 does not start on physical sector boundary.
2013-01-01 11:47:22.940 - ERROR - [fdisk] Partition 2 does not start on physical sector boundary.
2013-01-01 11:47:22.941 - ERROR - [fdisk] Partition 3 does not start on physical sector boundary.
2013-01-01 11:47:22.942 - ERROR - [fdisk] Partition 4 does not start on physical sector boundary.
2013-01-01 11:47:22.946 - INFO - Running 'blkid /dev/sdb1'
2013-01-01 11:47:22.975 - INFO - Running 'blkid /dev/sdb2'
2013-01-01 11:47:23.9 - INFO - Running 'blkid /dev/sdb3'
2013-01-01 11:47:23.43 - INFO - Running 'blkid /dev/sdb4'
2013-01-01 11:47:23.96 - INFO - Destination disk: sdb (1.8 TiB, mbr)
2013-01-01 11:47:23.98 - WARNING - Using MBR label on the B3 is not recommended (GPT is preferred); continuing anyway
2013-01-01 11:47:23.99 - ERROR - The existing (54.9 MiB) system partition does not meet minimal size criteria of 8 GiB
Remember: I previously changed my B3 setup to Full Raid as per Mouette's howto for the B2
I also put in the install.ini not to wipe the disk... maybe I should just do that and let it create new, clean and fresh partitions? (I have the external SATA disconnected so I keep the "raid copy" as backup for now)

Many thanks in advance Mouette for all the effort you are putting into this!
thumb's up!

regards,
Koen

MouettE
Site admin
Posts: 254
Joined: 06 Oct 2011, 19:45

Re: Debian stretch (9) image 1.0 released for B3

Post by MouettE » 21 Mar 2018, 21:47

What version of debian are you running on your b3 ? If jessie, it would be simpler to do an dist-upgrade.

pompopom
Posts: 50
Joined: 13 Dec 2012, 16:45

Re: Debian stretch (9) image 1.0 released for B3

Post by pompopom » 22 Mar 2018, 01:29

Hi Mouette,

I’m still on the version by default installed (besides some apt-get and the raid mod)
Squeeze if not mistaking.

Regards,
Koen

EDIT: I did another test yesterday evening with the wipe set to TRUE. Didn't work either although it gave me more output in the logfile. Unfortunately I forgot to copy it. Will do that later today (not @ home now)
Searched a bit around the internet, seems my sectors aren't aligned. This might be due to the fact I'm using, since last year, new WD disks as the original disk(s) started to fail. I admit I didn't pay real attention to the alignment at that tume.
My idea at the moment: hook up the disk on another system. erase the partitioning. repartition and align disk sectors. boot from usb and start from there.
Anyone used http://www.system-rescue-cd.org/ before on B3?

by the way: Mouette, if you prefer I start another thread instead of cluttering this one, I have no problem with that.

EDIT2:
Thx Mouette for setting a new thread :-)
As promised the output when I set wipe=true

Code: Select all

2013-01-01 11:47:26.925 - INFO - Running Excito installer version 2.0 daemon process with pid 110
2013-01-01 11:47:26.928 - INFO - Checking image file /mnt/usb/install/stretch/b3-stretch-1.0-20170703-2130.txz
2013-01-01 11:47:26.936 - INFO - Checking /dev/sdb
2013-01-01 11:47:26.937 - INFO - Running 'fdisk -l /dev/sdb'
2013-01-01 11:47:26.961 - ERROR - [fdisk] Partition 1 does not start on physical sector boundary.
2013-01-01 11:47:26.962 - ERROR - [fdisk] Partition 2 does not start on physical sector boundary.
2013-01-01 11:47:26.963 - ERROR - [fdisk] Partition 3 does not start on physical sector boundary.
2013-01-01 11:47:26.964 - ERROR - [fdisk] Partition 4 does not start on physical sector boundary.
2013-01-01 11:47:26.968 - INFO - Running 'blkid /dev/sdb1'
2013-01-01 11:47:26.999 - INFO - Running 'blkid /dev/sdb2'
2013-01-01 11:47:27.33 - INFO - Running 'blkid /dev/sdb3'
2013-01-01 11:47:27.68 - INFO - Running 'blkid /dev/sdb4'
2013-01-01 11:47:27.120 - INFO - Destination disk: sdb (1.8 TiB, mbr)
2013-01-01 11:47:27.122 - INFO - Wiping existing partition label on sdb
2013-01-01 11:47:27.123 - INFO - Running 'sgdisk -Z /dev/sdb'
2013-01-01 11:47:28.183 - ERROR - [sgdisk]  Caution: invalid main GPT header, but valid backup; regenerating main header
2013-01-01 11:47:28.185 - ERROR - [sgdisk] from backup!
2013-01-01 11:47:28.186 - ERROR - [sgdisk] 
2013-01-01 11:47:28.187 - ERROR - [sgdisk]  Warning! Main partition table CRC mismatch! Loaded backup partition table
2013-01-01 11:47:28.188 - ERROR - [sgdisk] instead of main partition table!
2013-01-01 11:47:28.189 - ERROR - [sgdisk] 
2013-01-01 11:47:28.191 - INFO - [sgdisk] Caution! After loading partitions, the CRC doesn't check out!
2013-01-01 11:47:28.192 - INFO - [sgdisk] GPT data structures destroyed! You may now partition the disk using fdisk or
2013-01-01 11:47:28.193 - INFO - [sgdisk] other utilities.
2013-01-01 11:47:28.190 - ERROR - [sgdisk] Warning! One or more CRCs don't match. You should repair the disk!
2013-01-01 11:47:28.195 - ERROR - [sgdisk] 
2013-01-01 11:47:28.196 - ERROR - [sgdisk] Invalid partition data!
2013-01-01 11:47:28.198 - ERROR - Unable to wipe partition label on sdb
Something I didn't notice yesterday but date and time is completely wrong... not that it has something to do with the errors, but I guess my RTC battery is dead, no?

pompopom
Posts: 50
Joined: 13 Dec 2012, 16:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by pompopom » 22 Mar 2018, 15:46

Ok so I went to back where I left yesterday.

As the flashdrive came right out of it’s package yesterday, I was starting to wonder if there was a correct partition table in the flash drive.
So I launched CMD as Administrator on a WIn10 box I have running and did the following:

Code: Select all

Microsoft Windows [Version 10.0.16299.309]
(c) 2017 Microsoft Corporation. Alle rechten voorbehouden.

C:\WINDOWS\system32>diskpart

Microsoft DiskPart version 10.0.16299.15

Copyright (C) Microsoft Corporation.
On computer: xyz-XX

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          931 GB  1024 KB
  Disk 1    Online         4095 KB      0 B
  Disk 2    No Media           0 B      0 B
  Disk 3    No Media           0 B      0 B
  Disk 4    No Media           0 B      0 B
  Disk 5    No Media           0 B      0 B
  Disk 6    Online         7632 MB      0 B

DISKPART> select disk 6

Disk 6 is now the selected disk.

DISKPART> clean

DiskPart succeeded in cleaning the disk.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> active

DiskPart marked the current partition as active.

DISKPART> format FS=FAT32 LABEL="B3"

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> exit

Leaving DiskPart...

C:\WINDOWS\system32>
I copied the ZIP once again to de flash drive and unzipped.
Altered the install.ini (LAN settings + set the wipe to false)
Booted B3 with the USB plugged in
Got a solid green led, solid light green (?), solid purple
Solid purple now for about 10 minutes, but I guess that's normal... patience is a virtue...

MouettE
Site admin
Posts: 254
Joined: 06 Oct 2011, 19:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by MouettE » 22 Mar 2018, 16:03

If you altered u-boot settings when enabling full raid on your b3 this is expected, as u-boot tells the kernel to look for RAID array which doesn't exist.

You need to do a manual install from the rescue system (most of the b2 RAID install wiki still applies) :
  • Boot the rescue system,
  • Create the new RAID array for system,
  • Partition the RAID array
  • Format the raid partitions
  • Mount the partitions
  • Unpack the system tarball
  • Adjust /etc/fstab on the system partition
  • umount and reboot

pompopom
Posts: 50
Joined: 13 Dec 2012, 16:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by pompopom » 22 Mar 2018, 17:07

Ok so I stopped waiting after reading your post. Seems logic what you're saying.

Looked in the log file and found a complete, successfull setup log. So it did what it has to do for sure :-)

Anyway following your post I tried to boot a rescue system, but I was getting the following LED sequence once more:
Led turns green (+/-30secs)
Then turns red
Then blinks 3 times (very light green(?))
Then purple
red again, blinks, purple etc...
which doesn't seem right.
I the log I get:

Code: Select all

2013-01-01 11:47:22.912 - INFO - Running Excito installer version 2.0 daemon process with pid 110
2013-01-01 11:47:22.921 - INFO - Checking image file /mnt/usb/install/None (rescue system only)
2013-01-01 11:47:22.922 - ERROR - image file not found !
Is that suppose to be like that?

ahoff
Posts: 85
Joined: 01 Apr 2008, 20:50
Location: Swe

Re: Upgrade from RAID-enabled squeeze to stretch

Post by ahoff » 23 Mar 2018, 05:49

Tought it was only me having that problem. :roll:
Åke Hoff
Örskogen
Sweden

pompopom
Posts: 50
Joined: 13 Dec 2012, 16:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by pompopom » 23 Mar 2018, 06:24

ahoff wrote:
23 Mar 2018, 05:49
Tought it was only me having that problem. :roll:
Problems are there to get solved :-)
What's your setup and goal?

pompopom
Posts: 50
Joined: 13 Dec 2012, 16:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by pompopom » 23 Mar 2018, 10:25

My plans for this weekend:

- Switching disks from S1 with my B3
- Rebuild the full raid on squeeze
- Disconnect S1 so I have a "backup"
- Boot B3 and change the uboot environment back to 'standard' (so it will no longer look for a md device)
- Do a clean Stretch install (this time reboot should work as uboot no longer looks for a md device)
- Run through the steps of getting everything back in full-raid as I did previously on my B3

Sounds like a plan, or is there a more convenient approach to try?
Mouette's advice to boot rescue system and start from there should do the trick also, but seems not working... (or in my ignorance I'm completely doing it wrong => never underestimate this option ;-) )

pitfall:
Once B3 is back in full raid I would like to hook up the S1, containing my "backup". However: my guess is that it will start rebuilding my raid array, erasing the content of the S1 which I first like to copy to my B3. Am I right or not?
As a workaround I might first connect the disk with a usb to sata dongle and copy from there.

any thoughts? advice?

MouettE
Site admin
Posts: 254
Joined: 06 Oct 2011, 19:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by MouettE » 23 Mar 2018, 11:29

That would probably work but I'd stay away from u-boot changes as I've seen a lot a problems with that at home. Why can't you boot the rescue system ? Is it because of the error about image None cannot be found ? That should not stop the rescue system from booting, but to fix it you need to comment the image configuration setting instead of putting None as a value.

pompopom
Posts: 50
Joined: 13 Dec 2012, 16:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by pompopom » 23 Mar 2018, 18:33

Resume:
I commented the image line in install.ini en retried.
Got a green led, then steady purple for more then an hour.
As I didn't see any networkinterface extra coming online in my network I removed power and went to check the install.log => seemed that it didn't create any?

So I removed more lines from the [general]
Got a green led, blinking light green, purple, red, blinking light green, etc...
This time I do have an install.log

Code: Select all

2013-01-01 05:35:06.953 - INFO - Running Excito installer version 2.0 daemon process with pid 110
2013-01-01 05:35:06.962 - INFO - No image in configuration. Exiting leaving the rescue system
This seems legit, I admit I didn't try to connect to it as I my idea was that it had failed, so I'm not sure if it was indeed working. Can anyone elaborate on the led sequence and tell me if this is "normal" behaviour?

I do need to connect to the WAN port, right?

MouettE
Site admin
Posts: 254
Joined: 06 Oct 2011, 19:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by MouettE » 23 Mar 2018, 22:24

It seems to work well.

You can connect either to the wan or the lan to a DHCP enabled network. Once the rescue system is up and running, the LED will animate with yellow and cyan colors to dictate the relevant part of the IP address acquired by DHCP.

pompopom
Posts: 50
Joined: 13 Dec 2012, 16:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by pompopom » 25 Mar 2018, 12:52

As the blinking LED apparently indicates which IP address has been leased, I assumed from then on everything is ok when seeing that. I didn't knew about that feature.
So I continued with scanning my network. Problem here is that some hardware visible on my local network does not identify itself. Printers, iPads, Phones, ... the like are noticed as is. But some other hardware isn't. This is hardware owned by my cable vendor. Also the B3 doesn't seem to go noticed on my network easily.

So for those who don't know: look for IP's linked to MAC addresses starting with 00:22:02

Connected over ssh and logged in with root/excito

Did some basic checks and wrote down some info

Code: Select all

[root@b3-install ~]# uname -a
Linux b3-install 4.9.34-b3-install #1 Tue Jul 4 00:07:11 EDT 2017 armv5tel GNU/Linux

Code: Select all

[root@b3-install ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:22:02:00:1F:02
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:38

eth1      Link encap:Ethernet  HWaddr 00:22:02:00:1F:03
          inet addr:192.168.1.240  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::222:2ff:fe00:1f03/64 Scope:Link
          inet6 addr: 2a02:1811:510:cb00:222:2ff:fe00:1f03/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1477 errors:0 dropped:6 overruns:0 frame:0
          TX packets:467 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:121012 (118.1 KiB)  TX bytes:74102 (72.3 KiB)
          Interrupt:39

Code: Select all

[root@b3-install /]# fdisk -l
Disk /dev/ram0: 2 MiB, 2097152 bytes, 4096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

**SOME MORE RAM DISKS**

Disk /dev/ram15: 2 MiB, 2097152 bytes, 4096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sda: 7.5 GiB, 8002732032 bytes, 15630336 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9b078e47

Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1  *     2048 15630335 15628288  7.5G  c W95 FAT32 (LBA)


Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: ABC86EB6-AD19-4755-B237-7FA9A0005CB6

Device        Start      End  Sectors  Size Type
/dev/sdb1      2048 20973567 20971520   10G Linux filesystem
/dev/sdb2  20973568 22022143  1048576  512M Linux swap

Code: Select all

[root@b3-install /]# mount
none on / type tmpfs (rw,relatime)
/dev/sda1 on /mnt/usb type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
devtmpfs on /dev type devtmpfs (rw,relatime,size=257472k,nr_inodes=64368,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
sysfs on /sys type sysfs (rw,relatime)
So far so good.
sda1 is my USB rescue disk
sdb1/2 is the physical disk which was partitioned few posts earlier,
but didn't boot as the u-boot environment no longer looks for sd but md devices (Raid) <= see below
So I dropped sdb1 and sdb2 partitions for starters

Code: Select all

[root@b3-install ~]# sfdisk --delete /dev/sdb

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
verified outcome:

Code: Select all

[root@b3-install ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: ABC86EB6-AD19-4755-B237-7FA9A0005CB6
Then create new partitions:

/boot 300MiB
/root 10GiB
/swap 512MiB
/home (the rest)

Code: Select all

[root@b3-install ~]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): n
Partition number (1-128, default 1):
First sector (2048-3907029134, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-3907029134, default 3907029134): +300M

Created a new partition 1 of type 'Linux filesystem' and of size 300 MiB.

Command (m for help): n
Partition number (2-128, default 2):
First sector (616448-3907029134, default 616448):
Last sector, +sectors or +size{K,M,G,T,P} (616448-3907029134, default 3907029134): +10G

Created a new partition 2 of type 'Linux filesystem' and of size 10 GiB.

Command (m for help): n
Partition number (3-128, default 3):
First sector (21587968-3907029134, default 21587968):
Last sector, +sectors or +size{K,M,G,T,P} (21587968-3907029134, default 3907029134): +512M

Created a new partition 3 of type 'Linux filesystem' and of size 512 MiB.

Command (m for help): t
Partition number (1-3, default 3):
Hex code (type L to list all codes): 19

Changed type of partition 'Linux filesystem' to 'Linux swap'.

Command (m for help): n
Partition number (4-128, default 4):
First sector (22636544-3907029134, default 22636544):
Last sector, +sectors or +size{K,M,G,T,P} (22636544-3907029134, default 3907029134):

Created a new partition 4 of type 'Linux filesystem' and of size 1.8 TiB.

Command (m for help): p
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: ABC86EB6-AD19-4755-B237-7FA9A0005CB6

Device        Start        End    Sectors  Size Type
/dev/sdb1      2048     616447     614400  300M Linux filesystem
/dev/sdb2    616448   21587967   20971520   10G Linux filesystem
/dev/sdb3  21587968   22636543    1048576  512M Linux swap
/dev/sdb4  22636544 3907029134 3884392591  1.8T Linux filesystem

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Referred to Mouette's HowTo to setup full Raid on B2

Create RAID array:

Code: Select all

[root@b3-install ~]# mdadm --create --metadata=0.9 --level=1 --raid-devices=2 /dev/md0 /dev/sdb1 missing
mdadm: array /dev/md0 started.
[root@b3-install ~]# mdadm --create --metadata=0.9 --level=1 --raid-devices=2 /dev/md1 /dev/sdb2 missing
mdadm: array /dev/md1 started.
[root@b3-install ~]# mdadm --create --metadata=0.9 --level=1 --raid-devices=2 /dev/md2 /dev/sdb3 missing
mdadm: array /dev/md2 started.
[root@b3-install ~]# mdadm --create --metadata=0.9 --level=1 --raid-devices=2 /dev/md3 /dev/sdb4 missing
mdadm: array /dev/md3 started.
Create LVM:

Code: Select all

[root@b3-install ~]# pvcreate /dev/md3
Physical volume "/dev/md3" successfully created.
[root@b3-install ~]# vgcreate bubba3 /dev/md3
Volume group "bubba3" successfully created
[root@b3-install ~]# lvcreate -l 100%FREE --name storage bubba3
Logical volume "storage" created.
Format SWAP:

Code: Select all

[root@b3-install ~]# mkswap /dev/md2
Setting up swapspace version 1, size = 512 MiB (536801280 bytes)
no label, UUID=d7c925f6-7dc0-41f0-b992-1dd58e98db5f
Format and mount /:

Code: Select all

[root@b3-install ~]# mkfs.ext3 -q -L "Bubba root" /dev/md1
[root@b3-install ~]# tune2fs -c0 -i0 /dev/md1
tune2fs 1.43.4 (31-Jan-2017)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
[root@b3-install ~]# mkdir /mnt/bubba
[root@b3-install ~]# mount /dev/md1 /mnt/bubba
Format and mount /boot:

Code: Select all

[root@b3-install ~]# mkfs.ext2 -q -L "Bubba boot" /dev/md0
[root@b3-install ~]# tune2fs -c0 -i0 /dev/md0
tune2fs 1.43.4 (31-Jan-2017)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
[root@b3-install ~]# mkdir /mnt/bubba/boot
[root@b3-install ~]# mount /dev/md0 /mnt/bubba/boot
Format and mount /home

Code: Select all

[root@b3-install ~]# mkfs.ext3 -q -L "Bubba home" /dev/mapper/bubba3-storage
[root@b3-install ~]# tune2fs -c0 -i0 /dev/mapper/bubba3-storage
tune2fs 1.43.4 (31-Jan-2017)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
[root@b3-install ~]# mkdir /mnt/bubba/home
[root@b3-install ~]# mount /dev/mapper/bubba3-storage /mnt/bubba/home
Extract the OS (Actual installation)

Code: Select all

[root@b3-install ~]# cd /mnt/usb/install/stretch
[root@b3-install stretch]# tar -xf b3-stretch-1.0-20170703-2130.txz -C /mnt/bubba
Edit fstab

Code: Select all

[root@b3-install stretch]# cd /mnt/bubba/etc/
[root@b3-install etc]# vi fstab

/dev/md1        /       ext3    noatime,defaults        0       1
/dev/md0        /boot   ext2    noatime,defaults        0       2
/dev/mapper/bubba3-storage      /home   ext3    defaults                0       2
/dev/md2        none    swap    sw                      0       0
usbfs           /proc/bus/usb   usbfs   defaults        0       0
/proc           /proc   proc    defaults                0       0
Create softlink in /boot

Code: Select all

[root@b3-install etc] cd /
[root@b3-install /] mkdir boot
[root@b3-install /] cd boot
[root@b3-install boot] ln -s . /mnt/bubba/boot/boot
Now for the u-boot...things are getting tricky see next post

pompopom
Posts: 50
Joined: 13 Dec 2012, 16:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by pompopom » 25 Mar 2018, 13:02

in my previous post I said:
no longer looks for sd but md devices (Raid)
and thus doesn't boot.
but I think it rather is: it looks foor the /dev/mtd-something device which doesn't exist.

Code: Select all

[root@b3-install /]# fw_printenv
Cannot open /dev/mtd1: No such file or directory

Code: Select all

[root@b3-install /]# cat /etc/fw_env.config
# MTD definitrion for Bubba|3
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1               0x000000        0x010000        0x010000

Code: Select all

[root@b3-install /]# ls /dev/
bsg                 md1                 ptyp2               ptypf               ram6                shm                 ttyp9
bubba3              md2                 ptyp3               ram0                ram7                tty                 ttypa
bus                 md3                 ptyp4               ram1                ram8                ttyS0               ttypb
console             mem                 ptyp5               ram10               ram9                ttyS1               ttypc
cpu_dma_latency     memory_bandwidth    ptyp6               ram11               random              ttyp0               ttypd
dm-0                network_latency     ptyp7               ram12               rtc0                ttyp1               ttype
full                network_throughput  ptyp8               ram13               sda                 ttyp2               ttypf
gpiochip0           null                ptyp9               ram14               sda1                ttyp3               urandom
gpiochip1           port                ptypa               ram15               sdb                 ttyp4               zero
kmsg                ptmx                ptypb               ram2                sdb1                ttyp5
log                 pts                 ptypc               ram3                sdb2                ttyp6
mapper              ptyp0               ptypd               ram4                sdb3                ttyp7
md0                 ptyp1               ptype               ram5                sdb4                ttyp8
so I'm stuck now...

Anyone has an idea?

EDIT:
If I understand Google correctly these mtd devices are "partitions" in our B3 flash memory. The partition defintion for these is located in the Kernel. Is it safe to assume that these defintions don't exist in the rescue mode and that they will be created when I reboot?
At this moment the mtd kernel module isn't even loaded.

Code: Select all

[root@b3-install ~]# lsmod -h
Module                  Size  Used by    Not tainted
dm_mod                 70188  3
af_packet              27424  0
ext4                  306680  3
**SNIP**
i2c_dev                 4260  0
i2c_core               16772  1 i2c_dev
unix                   22569 12
Doing a:

Code: Select all

[root@b3-install /]# insmod /lib/modules/4.9.34-b3-install/kernel/drivers/mtd/mtd.ko
Loads the kernel module:

Code: Select all

[root@b3-install /]# lsmod
Module                  Size  Used by    Not tainted
mtd                    33612  0
dm_mod                 70188  3
af_packet              27424  0
ext4                  306680  3
**SNIP**
i2c_dev                 4260  0
i2c_core               16772  1 i2c_dev
unix                   22569 12
and creates a /proc/mtd which didn't exist before that.

However it's empty:

Code: Select all

[root@b3-install /]# cat /proc/mtd
dev:    size   erasesize  name
Leaving me to assume it's missing the partition definitions at this moment...
Last edited by pompopom on 25 Mar 2018, 15:05, edited 1 time in total.

MouettE
Site admin
Posts: 254
Joined: 06 Oct 2011, 19:45

Re: Upgrade from RAID-enabled squeeze to stretch

Post by MouettE » 25 Mar 2018, 15:02

Sorry this is a bug of the rescue install os which doesn't load the proper module for the mtd device. I will fix that but all you need to do is load the proper module first :

Code: Select all

[root@b3-install devices]# modprobe m25p80
m25p80 spi0.0: m25p16 (2048 Kbytes)
3 ofpart partitions found on MTD device spi0.0
Creating 3 MTD partitions on "spi0.0":
0x000000000000-0x0000000c0000 : "u-boot"
0x0000000c0000-0x0000000e0000 : "u-boot env"
0x0000000e0000-0x000000200000 : "data"
[root@b3-install devices]# fw_printenv
baudrate=115200
bootalt2=run usbinstall || run usbflash || run sataboot || reset
bootdelay=1
bootfile=uImage
console=ttyS0
eth1addr=00:22:02:00:39:a3
ethact=egiga0
ethaddr=00:22:02:00:39:a2
flashfile=u-boot.kwb
installfile=install.itb
key=U2Zt0HwBnuihGKNKqwFqwqCOltc=
loadaddr=0x800000
sataboot=setenv diskdev $sataroot; run setdiskargs; ext2load $satadev $loadaddr /boot/$bootfile; bootm
satadev=sata 0:1
sataroot=/dev/sda1
serial#=15697
setbootargs=setenv bootargs root=$rootdev rw console=$console,$baudrate $othbootargs
setdiskargs=setenv bootargs root=$diskdev console=$console,$baudrate serial=${serial#} key=$key button=$button
usbboot=usb start; setenv diskdev $usbbootroot; run setdiskargs; ext2load $usbbootdev $loadaddr /boot/$bootfile; bootm
usbbootdev=usb 0:1
usbbootroot=/dev/sda1
usbflash=fatload $usbflashdev $loadaddr /install/$flashfile && sf probe 0:0 && sf erase 0 80000; sf write $loadaddr 0 $filesize
usbflashdev=usb 0:1
usbinstall=usb start; setenv diskdev $usbinstallroot; run setdiskargs; fatload $usbinstalldev $loadaddr /install/$installfile; bootm
usbinstalldev=usb 0:1
usbinstallroot=/dev/ram0
bootalt1=run sataboot || reset
stdin=serial
stdout=serial
stderr=serial
button=0

Post Reply