~sergiusens/snappy/tools-parted

« back to all changes in this revision

Viewing changes to partition/partition.go

  • Committer: Sergio Schvezov
  • Date: 2015-07-30 18:46:22 UTC
  • mfrom: (576.1.1 tools-grub)
  • Revision ID: sergio.schvezov@canonical.com-20150730184622-mga36e3aevz09qw5
Merged tools-grub into tools-parted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
}
303
303
 
304
304
// SyncBootloaderFiles syncs the bootloader files
305
 
// FIXME: can we unexport this?
 
305
//
 
306
//  We need this code solve the following scenario:
 
307
//
 
308
//  1. start with: /boot/a/k1, /boot/b/k1
 
309
//  2. upgrade with new kernel k2: /boot/a/k1, /boot/b/k2
 
310
//  3. reboot into b, running with /boot/b/k2
 
311
//  4. new update without a changed kernel, system-a updated
 
312
//
 
313
//  6. reboot to system-a with /boot/a/k1 (WRONG!)
 
314
//  But it should be system-a with /boot/a/k2 it was just not part of
 
315
//  the s-i delta as we already got it. So as step (5) above we do the
 
316
//  SyncBootloaderFiles that  copies /boot/b/k2 -> /boot/a/
 
317
//  (and that is ok because we know /boot/b/k2 works)
 
318
//
306
319
func (p *Partition) SyncBootloaderFiles(bootAssets map[string]string) (err error) {
307
320
        bootloader, err := bootloader(p)
308
321
        if err != nil {