update-initramfs: /usr/share/initramfs-tools/hooks/fixrtc failed with return 1
Solution 1
As pointed out by Montblanc,
sudo chmod -x /usr/share/initramfs-tools/hooks/fixrtc
will solve the issue.
Solution 2
Seems to be magically resolved in 3.8.0-24
Related videos on Youtube
Max von Hippel
Updated on September 18, 2022Comments
-
Max von Hippel over 1 year
I want to change the format of the CSV read in my code. The original format is:
Latitude, Longitude, Name, Country, Number
For example:
-80.26262, 25.81015, Everglades Motel, USA-United States, +1 305-888-8797
I want to use a file of the following format:
time,latitude,longitude,depth,mag,magType,nst,gap,dmin,rms,net,id,updated,place,type
For example:
2015-05-18T04:06:21.250Z,34.0221667,-116.4003333,9.05,0.83,ml,12,151,0.04781,0.11,ci,ci37164151,2015-05-18T04:10:34.999Z,"11km SSE of Yucca Valley, California",earthquake
I should preface this by saying I know very little about NSString conventions. Now, the original code gets the CSV file to parse like this:
NSString *data = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"quakes" ofType:@"csv"] encoding:NSASCIIStringEncoding error:nil]; NSArray *lines = [data componentsSeparatedByString:@"\n"]; NSInteger count = lines.count - 1; TBQuadTreeNodeData *dataArray = malloc(sizeof(TBQuadTreeNodeData) * count); for (NSInteger i = 0; i < count; i++) { dataArray[i] = TBDataFromLine(lines[i]); } TBBoundingBox world = TBBoundingBoxMake(19, -166, 72, -53); _root = TBQuadTreeBuildWithData(dataArray, count, world, 4);
The code then parses the resulting NSString like this:
TBQuadTreeNodeData TBDataFromLine(NSString *line) { NSArray *components = [line componentsSeparatedByString:@","]; double latitude = [components[1] doubleValue]; double longitude = [components[0] doubleValue]; TBHotelInfo* hotelInfo = malloc(sizeof(TBHotelInfo)); NSString *hotelName = [components[2] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; hotelInfo->hotelName = malloc(sizeof(char) * hotelName.length + 1); strncpy(hotelInfo->hotelName, [hotelName UTF8String], hotelName.length + 1); NSString *hotelPhoneNumber = [[components lastObject] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; hotelInfo->hotelPhoneNumber = malloc(sizeof(char) * hotelPhoneNumber.length + 1); strncpy(hotelInfo->hotelPhoneNumber, [hotelPhoneNumber UTF8String], hotelPhoneNumber.length + 1); return TBQuadTreeNodeDataMake(latitude, longitude, hotelInfo); }
I changed the code so the component numbers were right for my string (lat = 1, long = 2, name = 13, number = 4) and I tried changing the code to not trim for whitespace (I just made it " NSString *hotelName = components[2]; ") but neither thing worked (alone or in unison). I also tried getting rid of the +1s. My data is being read- it NSLogs fine, it just doesn't parse to the map. Perhaps this is because of commas in quotation marks in my code. If so, or otherwise, how can I fix this?
-
Montblanc almost 11 yearsWorked around it by removing the executable flag from fixrtc with
sudo chmod -x /usr/share/initramfs-tools/hooks/fixrtc
. Now update-initramfs completes building an initrd image. Is there anything bad that could happen by removing fixrtc as I did? I'm still curious about what happened!
-
-
Montblanc over 10 yearsStumbled back upon it while upgrading to 13.10. Had to toggle again the executive flag.