Welcome! Log In Create A New Profile

Advanced

Booting from third partition of disk

Posted by balanga 
Booting from third partition of disk
May 19, 2019 02:32PM
I have installed the Debian rootfs on /dev/sda3 and labelled it rootfs, but uboot doesn't want to boot from it.

At the boot prompt, I run scan_disk and get the following:-

GoFlexHome> run scan_disk
running scan_disk ...
Scan device usb
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD1600BEVS-08VAT2  Firm: 14.01A14 Ser#:  WD-WX50E69MZ266
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)
device ide 0:1
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
device ide 1:1
** Bad device ide 1 **
GoFlexHome>

Should I be able to boot from the third partition, and if so what do I need to do? Do I need any changes to my environment?

Here is a log:-
Script started on Sun May 19 20:18:52 2019
Command: cu -l /dev/cuaU0 -s 115200
Connected


U-Boot 2017.05-tld-2 (Jul 26 2017 - 02:37:42 -0700)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  3  2  1  0 
Initializing devices...
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD1600BEVS-08VAT2  Firm: 14.01A14 Ser#:  WD-WX50E69MZ266
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)
Loading envs from usb 0...
** Bad device usb 0 **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from ide 0...
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Loading envs from ide 1...
** Bad device ide 1 **
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD1600BEVS-08VAT2  Firm: 14.01A14 Ser#:  WD-WX50E69MZ266
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)
device ide 0:1
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
device ide 1:1
** Bad device ide 1 **

Output from cfdisk:-


                                 Disk: /dev/sda
             Size: 149.1 GiB, 160041885696 bytes, 312581808 sectors
                       Label: dos, identifier: 0xe0b98dff

    Device      Boot       Start        End    Sectors   Size Id Type
    /dev/sda1   *           2048     731135     729088   356M  7 HPFS/NTFS/exFAT
    /dev/sda2             731136  159839919  159108784  75.9G  7 HPFS/NTFS/exFAT
>>  /dev/sda3          159840256  205977599   46137344    22G 83 Linux          
    Free space         205977600  312581807  106604208  50.9G


     Partition type: Linux (83)                                              
     Filesystem UUID: d28277c9-8fa0-4193-a24f-7dc03e194764
     Filesystem LABEL: rootfs                                                 
     Filesystem: ext3                                                      

Bootable]  [ Delete ]  [ Resize ]  [  Quit  ]  [  Type  ]  [  Help  ]
     [  Write ]  [  Dump  ]

                      Quit program without writing changes

Maybe I need to mark /dev/sda3 bootable...
Re: Booting from third partition of disk
May 19, 2019 05:33PM
balanga,

Is there a good reason why the organization is way?

/dev/sda1   *           2048     731135     729088   356M  7 HPFS/NTFS/exFAT
    /dev/sda2             731136  159839919  159108784  75.9G  7 HPFS/NTFS/exFAT
>>  /dev/sda3          159840256  205977599   46137344    22G 83 Linux

Can you put the Linux partition on 1st?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Booting from third partition of disk
May 19, 2019 05:52PM
It was just a quick way of freeing up some space on a Windows disk to install a Debian rootfs.
Not sure how to move the Windows partitions to the end.... Any suggestions?
Re: Booting from third partition of disk
May 19, 2019 06:40PM
balanga

> It was just a quick way of freeing up some space
> on a Windows disk to install a Debian rootfs.
> Not sure how to move the Windows partitions to the
> end.... Any suggestions?

In-disk Partitions moving using tool is not really recommended (too risky if you have data you want to keep).

The easiest way is to format a different disk with the partition scheme you want and then copy the content over.

Or if there is not much data then you can use a backup procedure such as one in the Wiki thread

Quote

Backup and Cloning rootfs

CrashPlan 4.3.0
Backup/Restore rootfs using tar command
Adjust udev rules after cloning rootfs
Stock Pogoplug rootfs
How to clone a rootfs from one Kirkwood box to another: Step 1 and Step 2
How to clone SATA rootfs to USB rootfs

Back up, wipe out the disk. Create the Linux partition first. And restore.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Booting from third partition of disk
May 20, 2019 07:16AM
bodhi Wrote:
-------------------------------------------------------
> The easiest way is to format a different disk with the partition scheme you want and then copy the content over.
>
I would second this.

However, I don't know much how the Windows boot partition works. IIRC, every old MSDOS (not sure about Windows NTFS) boot disk contains two hidden boot files. If the hidden bit is unset, the files will be shown when listed with dir command and thus can be copied using the DOS copy command to another formatted disk. As such, using the DOS copy command to copy the entire disk to another formatted disk and then restore the hidden bit on the boot files will make the disk unbootable, IIRC. I believe the reason is the old MSDOS looks for those boot files to reside on certain track/sector of the disk. So, to avoid such a mishap, perhaps it is best to confirm the newly created disk will work before destroying all the data on the old and/or working disk (formatting).
Re: Booting from third partition of disk
May 20, 2019 07:49AM
I've never really understood how the Windows boot partition works either, so decided to leave that disk alone, just copied the Debian partition to another disk which I cleared down, and everything booted up OK.

Thanks for the replies.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: