Partitioning for a UEFI boot loader, can LVM be used?
176
No.
UEFI Bios tries to find a partition in a GPT-partitioned boot device. This partition needs to be tagged with "EFI System" (see fdisk's "t" command for all options) and also needs to be formatted with FAT filesystem.
You'll find a good explanation here...
Command (m for help): p
Disk /dev/sda: 167.7 GiB, 180045766656 bytes, 351651888 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: gpt
Device Start End Sectors Size Type
/dev/sda1 2048 534527 532480 260M EFI System
/dev/sda2 534528 351651839 351117312 167.4G Linux LVM
Related videos on Youtube
Author by
lightless07
Updated on September 18, 2022Comments
-
lightless07 over 1 year
I have a Class called Product that contains some propeties, I wanna make that my class will be the base for an list of Product called Products. And this list can access in a UITableView to fill it with the content of Products.
Also, the content of each product will be filled by a web service.
My code is:
@interface Product : NSObject { int identifier; NSString* title; NSString* quantity; float price; UIImage* image; } @property (nonatomic, assign) int identifier; @property (nonatomic, retain) NSString* title; @property (nonatomic, retain) NSString* quantity; @property (nonatomic, assign) float price; @property (nonatomic, retain) UIImage *image; -(id)initWithProduct:(int) identifier withTitle:(NSString*)title numberUses:(NSString*)uses withPrice:(float)price withImage:(UIImage*)image; @end
With his .m
@implementation Product @synthesize identifier = _identifier; @synthesize title = _title; @synthesize price = _price; @synthesize quantity = _quantity; @synthesize image = _image; - (void)dealloc { NSLog(@"article dealloc \n"); [self.title release]; [self.quantity release]; [self.image release]; [super dealloc]; } - (id)init { self = [super init]; if(self) { self.title = [[[NSMutableString alloc] init] autorelease]; self.identifier = 0; self.price = 45.0; self.quantity = [[[NSMutableString alloc] init] autorelease]; self.image = [[[UIImage alloc] init] autorelease]; } return self; } -(id)initWithProduct:(int) inIdentifier withTitle:(NSString*)inTitle numberUses:(NSString*)inQuantity withPrice:(float)inPrice withImage:(UIImage*)inImage { self = [super init]; if (self) { if (title!= nil) { self.title = inTitle; } if (quantity!= nil) { self.quantity = inTitle; } if (image!= nil) { self.title = inTitle; } self.price = inPrice; self.identifier = inIdentifier; } return self; } @end
My UITableView header is:
@interface TableView : UIViewController < UITableViewDataSource , UITableViewDelegate >{ NSMutableArray *products; }
in the m. I have:
EDIT Now the Title of my cell is shows as (null)
- (void)viewDidLoad { [super viewDidLoad]; products = [[NSMutableArray alloc] init]; [products addObject:[[Product alloc] initWithProduct:1 withTitle:@"df" numberUses:@"dsf" withPrice:12.3 withImage:[UIImage imageNamed:@"btn_invite"]]]; [products addObject:[[Product alloc] initWithProduct:1 withTitle:@"2" numberUses:@"dsf" withPrice:12.3 withImage:[UIImage imageNamed:@"btn_invite"]]]; [products addObject:[[Product alloc] initWithProduct:1 withTitle:@"4" numberUses:@"dsf" withPrice:12.3 withImage:[UIImage imageNamed:@"btn_invite"]]]; [products addObject:[[Product alloc] initWithProduct:1 withTitle:@"4" numberUses:@"dsf" withPrice:12.3 withImage:[UIImage imageNamed:@"btn_invite"]]]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { Controller *cell = (Controller*)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier]; if (cell == nil) { NSString* nameNib = UIUserInterfaceIdiomPad == UI_USER_INTERFACE_IDIOM() ? @"Controller" : @"ControllerIph"; NSArray *nib = [[NSBundle mainBundle] loadNibNamed:nameNib owner:self options:nil]; cell = [nib objectAtIndex:0]; } Product* obj = [products objectAtIndex:indexPath.row]; cell.title.text = [NSString stringWithFormat:@"%@", obj.title]; return cell; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 4; }
Thanks in advance!
-
Chris Tetreault almost 11 yearsI don't see an initWithChip method in your Product implementation file
-
lightless07 almost 11 yearsWhen the table is load. [__NSArrayM objectAtIndex:]: index 4 beyond bounds [0 .. 3]'
-
herzbube almost 11 yearsCan you show the implementation of
tableView:numberOfRowsInSection:
? -
lightless07 almost 11 yearsThanks for the feedback, I edit my question right now :)
-
herzbube almost 11 yearsI just deleted my comments and made them into an answer so that I have more space to elaborate. Sorry for the confusion :-)
-
herzbube almost 11 yearsEdited my answer why you see "(null)".
-
Admin over 9 yearsno. not possible. also, lvm is a pretty nasty tech anyway.
-
Admin over 9 yearswhy would you be opposed to shar[ing] the 20GB device by splitting it... anyway? I don't understand that at all. It sounds like you're not very clear on what partitioning means, and maybe a little in the dark about UEFI as well. Look here and follow the links to rodsbooks.com
-
Admin over 9 years@mikeserv Well I wanted the 20GB device as a single partition for root. That leaves the larger device unadulterated for /home and media making upgrades or OS changes easier. What I ultimately did last night was set the 400MB device to be the /boot partition anyway. I did find in Arch Wiki documentation where they explicitly stated LVM cannot be used for the /boot partition.
-
Admin over 9 years@mikeserv I am very much in the dark about UEFI, I have only installed Linux before on a BIOS firmware and MBR partitions. UEFI and GUID partitions are very new to me.
-
Admin over 9 yearsI just meant - what have you got against partitioning the 20gb disk? And what I said about
lvm
- ok, it isn't in-and-of-itself nasty, but when it swallows whole disk arrays and becomes a single point of failure, well.... Yeah, that's why I pointed you to those links - did you follow them? -
Admin over 5 years@maple_shaft try ZFS with freebsd. Even with a single disk, it’s just better.
-
Admin over 5 years@mikeserv but in this case there’s only one disk anyways (a laptop), which is also a single point of failure. Isn’t volume management easier than making size guesses for conventional partitions?
-
-
lightless07 almost 11 yearsCan you help me with the titles? My code don't show me correctly the content of the array :(
-
Chris Tetreault almost 11 yearslook at @herzbube 's answer
-
lightless07 almost 11 yearsThanks! :) Is pretty cool your help! Now, is correct my way of create the array of Products? It can help me if I wanna fill my array of objects with data of the web?
-
herzbube almost 11 years@lightless07 The
Product
class certainly won't give you any trouble, after all it's just a simple data class. As for filling the array, well, I would suggest that you create a separate class that interacts with your web service and createsProduct
instances. Your controller can then obtain theProduct
instances from that other class. I don't have experience with web services, though, so I can't give you any hints that are more specific than this.